Backups
Whenever you change a Registration in Configuration mode, a backup is kept of the previous version, as a safety net.
By default these backups are stored in a backups.zip file in the install directory for Box Of Stops. The location of this backup file can be changed from Application properties though.
Restoring a registration file
There are many ways to restore a Registration from backups.zip. If you are familiar with working with zip files, please just extract the appropriate version of the .registration file to the registrations directory under the install directory, and then rename the file to remove the date and time from the file name.
One way to do this is using the unzip command that comes built in with Raspbian (the operating system for a Raspberry Pi).
First list the files in the zip file:
cd ~/boxofstops unzip -l backups.zip
Once you have located the appropriate version of the registration to restore, this can be extracted and renamed in one step as follows:
unzip -p backups.zip registrations/chosen-registration-version.registration > registrations/chosen-registration.registration
E.g.
unzip -p backups.zip registrations/sample-registration-2016-11-06-14-42.registration > registrations/sample-registration.registration
Backup rotation
A system of backup rotations is used to control the number of copies of each registration that are kept over time. Recent edits are kept at a rate of:
- one per minute for the last hour
- one per hour for the last day
- one per day for the last month
- one per month for older months