Restore (as a task)¶
Restore the database:
fab domain:www.hatherleigh.info restore:backup
fab domain:www.hatherleigh.info restore:files
To check the date of all your backups:
fab domain:www.hatherleigh.info check
There are several ways to diagnose a problem with the backup:
When you start a
filesrestore, you can see the date of the backup e.g:
restoring <Snapshot 52bb5c15 of [/home/web/repo/files/www.hatherleigh.info] at 2019-02-25 01:04:54.115006483 +0000 UTC by @cloud-a> to /tmp/tmp5gitu21o
This backup was taken on the 25th February which would indicate either no backup since the 25th February or no files have changed since then.
There is a fabric command which will display the date and time of all the backups:
cd ~/dev/module/fabric/ fab domain:www.hatherleigh.info check
The backup date is highlighted in red when it isn’t today. A red date doesn’t necessarily indicate a problem, it might just mean no files have changed since that date.
sshinto the server and create a new backup:
ssh www.hatherleigh.info sudo -i -u web backup.www.hatherleigh.info.sh
The backup command will start by creating a database backup and will then create a
filesbackup. If you check the output of the command, you can see if the restic repository is locked (or not).
To unlock the restic repository you can run the following from your laptop:
export RESTIC_PASSWORD="r35T1C" # backup restic -r sftp:email@example.com:restic/www.hatherleigh.info/backup unlock # files restic -r sftp:firstname.lastname@example.org:restic/www.hatherleigh.info/files unlock