Btrfs snapshot backup utility
- Push/pull support via SSH
- Retention
- Email notifications
- Compression of transferred data
- Syslog logging
The following packages have to be available on both source and destination
- bash
- btrfs-progs
The system executing btrfs-backup requires
- python3
- ssh (for remote push/pull, not required for local operation)
- bash has to be set as the default remote shell for the user running the backup
- lzop (for compression support if desired)
- pv (provides progress indication if installed)
- sendmail (for email notifications if desired)
- when using ssh, public/private key authentication should be set up
- the destination filesystem has to be mounted without the subvol option, otherwise an error will occur on btrfs receive prompting you to remount with fs tree
- some commands (like update) may not be available for backup jobs created with older versions of btrfs-sxbackup. in this case backup jobs can be recreated using destroy and init. existing snapshots will be kept as long as destroy is not invoked with --purge.
Initialize a backup job pulling snapshots of subvolume / on remote host myhost.org to local subvolume /backup/myhost
Initialize a backup job pushing snapshots of local subvolume / to remote subvolume /backup/myhost on host mybackupserver.org
note that in the ssh:// URL, the username and port part are optional; if not specified, the defaults will be used.
Run a backup job
Cronjob performing a pull backup job