There are several parts of Elvis that need to be backed up regularly to ensure an easy restore and recovery in case of failure of hardware.
What to backup
Because all Elvis data is stored on the filesystem it is easy to backup using standard backup tools. Simply put, all data in the following Elvis server folders should be backed up:
- Elvis Data
How to restore
To restore a backup, stop the Elvis server, restore the files from your backup and then start the Elvis server again.
After restoring the Elvis Data folder and configuration, the state of the index in the Elvis Hot Data might not reflect what is now in the mainFilestore. You can restore a backup of the hot data, and use tools like the index updater and big index builder to synchronize the state of the index and mainFilestore.
Hot Data: index and internal database
The "Elvis Hot Data" folder contains the search engine index and internal database. These are constantly in use and changing while the Elvis server is running. This makes them hard to backup using conventional tools. In version 4.x, the Elvis server makes 'live' backups of that data while it is running. These backups are placed in the "Elvis Data/hotDataBackup" folder so you can easily include them in your normal backup.
These live backups are triggered by the internal "backup" schedule plug-in. By default the hot data backup is performed every day at 3 AM. You can change this in the backup plug-in config. You can also configure the maximum number of backups to keep in the server configuration:
# Maximum number of backups. The oldest backups in the backupLocation are removed # if the number of backups exceeds maxBackups # maxBackups=30
Hot Data restore
To restore a hot-data backup, use the backup and restore page in the Elvis admin webpage. This page shows all backups from the Elvis Data/hotDataBackup folder and allows you to restore them.
Note that in some cases, restoring a backup on a running server may fail if certain resources are in use. If you restart your Elvis server before doing the restore, you have less chance of resources being in-use. Make sure to check the server log to see if your backup was completely restored successfully.
Alternative Hot Data restore (1)
If you only need to restore index files, the best way to do this is to stop the Elvis server and replace the index folder in the Elvis Hot Data folder with the index folder from your backup. The structure of the backup is identical to that of the live data.
- Stop the Elvis server.
- Remove or rename the 'Elvis Hot Data/index' folder.
- Copy the 'index' folder from your hot data backup to the 'Elvis Hot Data' folder.
- Start the Elvis server.
Alternative Hot Data restore (2)
There is another way to prevent problems with resources being in use during a restore and which also works for restoring databases. This can be useful when your server is unresponsive or does not start up anymore because of problems in one of the databases, for example a queue database that has grown out of proportions.
This method relies on the built-in mechanism used to initialize the demo pack included with new Elvis server installations. When the following file is available:
It will automatically be restored (and subsequently deleted) by your Elvis server when it starts up. You can create a hotdemodata.zip yourself by building a zip from your backup folder. Make sure to select the 'database' and 'index' and then build a zip from those. The 'database' and 'index' folders must appear as top level folders in the zip, otherwise it won't be restored properly.
Hot Data partial restore
To perform a partial restore, remove the parts you don't want to restore. Only those parts that are available in the backup folder will be restored, the rest of the system won't be touched. The screenshot below shows a modified backup folder that which will restore only the internal security database (that contain the rules and permission configuration) and the relation index.
There is no direct need to regularly backup a processing server. The processing server does not keep track of any essential data. If the machine fails, the processing server can be re-installed on another machine with a few clicks.
You should make a copy of the processing server configuration files to easily move your configuration to other installations.