Recovers backup files stored on a remote destination. This command would be used if the disk containing your local backup directory fails, or if a backup archive file or the main database is accidentally deleted from your local backup directory.
$ hb recover -c backupdir [destname] [--force] [-n] [-a]
The recover command will fetch all backup files from the remote destination that do not exist in the local backup directory and copy them to the local backup directory. This copy also occurs if the local file exists but is a different size than the remote file.
To do a full recover, create an empty backup directory, copy the original backup's key.conf and dest.conf files there, then run the recover command. You do not run the init command before recover.
The --force option causes recovery to start without a confirmation prompt.
The -n option skips downloading of any archive files. Normally archive files are recovered if the cache-size-limit config option is -1 (the default), but this may be a lot of data. In a disaster recovery situation, only some critical files may need to be restored immediately. By using -n, the local backup directory can be recovered quickly, the hb get command can be used to restore the critical files (downloading only the required archives), then the recover command without -n can be used later to recover all archive files.
The -a option downloads archive files even if they already exist in the local backup directory. This can be used if the local copies are suspect for some reason.
VERY IMPORTANT: in the event of a disk failure, you must have a copy of the dest.conf and key.conf files from your backup directory. These files are never copied to remote destinations. The dest.conf file is required to recover your backup from an offsite server, and the key.conf file is required to decode your encrypted backup data. You must copy your dest.conf and key.conf files to one or more USB flash drives, or print these files, and store the copies in several locations separate from the backup data. If your backup is passphrase protected, you must also know the passphrase.
EXAMPLE RECOVER SESSION:
$ hb recover -c /hbbackup
Backup directory: /hbbackup
Recovering backup files from destination: bsrsync
Files will be copied to: /hbbackup
Proceed with recovery? y
Getting dest.db from bsrsync
Getting hb.db from bsrsync
Getting arc.0.0 from bsrsync
Writing archive 0.0
Getting arc.0.1 from bsrsync
Writing archive 0.1
Getting arc.230.0 from bsrsync
Getting arc.231.0 from bsrsync
Getting arc.260.0 from bsrsync
Backup files recovered to: /hbbackup
Verify your backup is intact with the selftest command:
hb selftest -c /hbbackup
EXAMPLE SESSION NOTES: