The backup/restore service provides two pieces of functionality:
- Backup
- Restore
When configuration files are created or modified, other services will inform the BackupRestore Service. On receipt of the notification, a timer is created with a random number between 1-12. That number represents the hours to delay before starting a backup job. The idea here is to reduce the number of backups created per day.
The backup job is comprised of the following steps:
- Create a tarball of all configuration files and the version file
- Encrypt the tarball (optional)
- Upload the encrypted tarball to the cloud
- Send notification that the backup is complete
Generally used during an RMA, the restore process flow is:
- Download an encrypted backup tarball from the cloud
- Decrypt the encrypted tarball (optional)
- Unpack the decrypted tarball into a temporary directory
- Notify each service of the temporary location
- Restart any services that respond to the notification with a
RESTORED_CALLBACK_RESTART
- Delete/cleanup the temporary directory
- Send notification that the restore is complete