Behind the scenes, Sisense stores all of the information about your Sisense Web environment in several database files. This information includes how dashboards are configured, what users are in the system, how groups are defined, as well as some other configuration settings. Since the web environment can regularly change, and may need to be restored, it's useful to keep regular backups of this data. This article shows how to use a program that will perform daily backups of this data.
The Script: SisenseWebBackup.bat
Attached to this post is the file SisenseWebBackup.bat. It is a windows batch file that copies the necessary files into a separate directory. A folder will exist for each day that the program is ran. You will need to edit this script in order to set the location of where to put the web backup files, and the location of the Sisense data folder, in case you changed it from the default location.
You can open this file and edit it with any standard text editor, such as Notepad. Once you've opened the file, you will only need to edit the variables set on the first 4 lines. Here's a screenshot of the first 4 lines, and below it are explanations of each variable.
Today: This determines the current date. Each day's backup will reside in a separate folder that's named for the current date. If you're scheduling backups to run more than once a day, you should edit this so repeat backups don't write to the same folder.
BackupDir: This is the directory where the backups will reside. Change this to whatever location you wish to use. Make sure the location exists before running the script, otherwise you will get an error message
prismWebDir: This is the directory where Sisense stores the web data. This is the default installation directory and cannot be changed.
DaysBack: This sets the number of days of history to keep. Currently, I have it set to only maintain 10 days worth of backups. Backups older than 10days old will be deleted. If you do not wish to have any backups deleted, please delete the variable from the script, along with the forfiles command on line 12. The forfiles deletes the data.
Implementing the Script
Before setting up the script to run automatically, you should test it by running it manually. You can manually run a batch file in Windows by double clicking it in the file browser. This should be tested manually to see that all of the files are able to be moved to the new location. If the system is unable to find the folders specified in BackupDir or prismWebDir, an error message will pop up. Once you've verified that the script is working properly, you can automate it.
The easiest way to implement this script is to use the Windows program Task Scheduler. Information on how to schedule a task can be found here: http://windows.microsoft.com/en-US/windows/schedule-task#1TC=windows-7
Once the script is set up to run automatically in Task Scheduler, your setup is complete. After this, you'll see the directory get populated with the backups.
Recovering the Data
To reset your Sisense Web environment to one of your backups, drag the files from the backup folder into the following directory on the server: C:\ProgramData\Sisense\PrismWeb\DB\Prod . The files in the backup will replace the files of the same name that are currently being used for Sisense Web.