This article shall serve as a guide on creating backups of your Enterprise Recon Master Server using our live backup tool.
Note that it is not necessary to stop the 'er2-master' service when creating a backup, but necessary when restoring from a backup.
Creating the backup
- Login to your ER Master Server terminal console as root
- Run the script for the backup tool using the command; /var/lib/er2/scripts/backup-start.rb /tmp/backup.bak
This would create a backup file (.bak) in the /tmp directory of your Master Server.
If you wish to create the backup in another directory, enter the following commands;
i) mkdir <BACKUP OUTPUT DIRECTORY>
ii) chown erecon:erecon <BACKUP OUTPUT DIRECTORY>
iii) /var/lib/er2/scripts/backup-start.rb <BACKUP OUTPUT DIRECTORY>/backup.bak
* It is possible to mount a remote partition and set that as the output directory.
** It is good practice to include the version of ER in the name of the backup file at the time of the backup.
- To view the backup progress, enter the command; /var/lib/er2/scripts/backup-jobs.rb
To stop the backup process, enter the command; /var/lib/er2/scripts/backup-stop.rb <JOB ID>
Restore from backup
Ensure that the backup file is in your Master Server, then login to the terminal console as root and enter the following commands;
- er2-recovery -b <BACKUP FILE DIRECTORY>/backup.bak -w <SAME DIRECTORY>/root.kct
(eg. er2-recovery -b /tmp/backup.bak -w /tmp/root.kct)
- /etc/init.d/er2-master stop
- mv /var/lib/er2/db/root.kct /var/lib/er2/db/root.orig
- cp <BACKUP FILE DIRECTORY>/root.kct /var/lib/er2/db/root.kct
- cd /var/lib/er2/db
- chown erecon:erecon root.kct
- chmod go-r root.kct
- /etc/init.d/er2-master start
Backup using Web Console
From ERv2.0.21 scheduled backups can be created in the web console. Goto Monitoring and Alerts>Server Information> Backup Section.
Note: If creating a backup from within the web console backing up to a windows share, after you mount the windows share in the master server following the steps above, the location you need to enter in the web console is /mnt/$remote_share$
All information in this article is accurate and true as of the last edited date.