Backup and restore Hawkeye databases
Hawkeye Results Data
Hawkeye Results are stored in a NoSQL database for faster response times and to facilitate future expansion. Hawkeye Results data is backed up every night at midnight server time. System administrators are also presented with the option to create a backup of the Hawkeye Results data as part of a server update.
Hawkeye Configuration Data
Hawkeye Configuration data is stored in a SQL database. System Administrators are presented with the option to create a backup of the Hawkeye Configuration data as part of a server update. Otherwise a backup can be manually triggered from the Hawkeye UI.
Creating a Backup
Backing up during an update
The most common time for System administrators to want to create a back up is right before an update to the system. Knowing this information, during the upgrade dialog the System Administrator is presented with the option to create backups of Configuration data, Results data, or both. By setting the corresponding slider to “ON” a backup of the data will be created before any changes are made to the system.
Manual Backup
If for any reason you want to create a backup of the configuration data, results data, or both you can do so by navigating to the System page on the side bar and select the Backup button in the Data Pane. This will open the backup dialog:
Set the slider to ON next to the data you want to create a backup for and then select Backup Now.
Hawkeye Server only stores one backup for the Configuration data and one backup for the Results data. Each subsequent backup will overwrite the existing backup.
Backup Storage locations
Backups are stored in /opt/backup/
The configuration backup is a single bzip file with the name: Hawkeye_Configuration_backup.sql.bz2
Restore process expects the exact file name for configuration backups.
The results data backup is an entire directory. All the files in /opt/backup/elasticsearch/ are required to be in this exact path for the restore process.
You can store copies of these backup files in the database by using the Upload option in Hawkeye. You can copy Hawkeye_Configuration_backup.sql.bz2 without any additional steps.
To move the results data backup, compress it into a single bzip2 file and then run the following commands on the cli:
sudo cd /opt/backup/elasticsearch/
sudo tar -jcvf /tmp/hawkeye-results_<Date>.bz2 *
This will extract the bzip2 file to /tmp/hawkeye-results_<Date>.bz2. You can then move it to your off device storage for later use.
Restore Backups
The Hawkeye restore process expects the backups will be located where the backup process creates them. If files were saved to an off-server location, they will need to be returned to the original location for the restore process to work.
To start the restore process navigate to the System page on the side bar and select the Restore button in the Data Pane. This will open the restore dialog box.
Set the slider to ON next to the data you want to restore and then select Restore Now.