Docker image to initialize, backup to, and restore from a Restic repository on Backblaze B2.
- Create a B2 bucket to hold your backups
- Supply all appropriate environment variables
- Initialize the Restic repository on B2 to hold the backups (one-time only)
- Run a backup and check your bucket for that backup
-
B2_ACCOUNT_ID
- Backblaze keyID -
B2_ACCOUNT_KEY
- Backblaze applicationKey -
FSBACKUP_MODE=[init|backup|restore]
-init
initializes the Restic repository at$RESTIC_REPOSITORY
(only do this once);backup
performs a backup;restore
performs a restoration. -
RESTIC_BACKUP_ARGS
- additional arguments to pass to 'restic backup' command -
RESTIC_FORGET_ARGS
- additional arguments to pass to 'restic forget --prune' command (e.g., --keep-daily 7 --keep-weekly 5 --keep-monthly 3 --keep-yearly 2) -
RESTIC_HOST
- hostname to be used for the backup -
RESTIC_PASSWORD
- password for the Restic repository -
RESTIC_REPOSITORY
- Restic repository location (e.g., 'b2:bucketname:restic') -
RESTIC_TAG
- tag to apply to the backup -
SOURCE_PATH
- full path to the source directory to be backed up -
TARGET_PATH
- full path to the target directory to be restored to (usually the same as the SOURCE_PATH)
It's recommended that your B2 bucket NOT have versioning turned on. Old versions of Restic's repository files are not useful.
This image is built automatically on Docker Hub as silintl/restic-backup-restore-b2