masc3d / btrfs-sxbackup

Incremental btrfs snapshot backups with push/pull support via SSH

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

btrfs-sxbackup

Btrfs snapshot backup utility

  • Push/pull support via SSH
  • Retention
  • Email notifications
  • Compression of transferred data
  • Syslog logging

System dependencies

Required

The following packages have to be available on both source and destination

  • bash
  • btrfs-progs

The system executing btrfs-backup requires

  • python3

Optional

  • 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)

Installation

Setup

  • when using ssh, public/private key authentication should be set up

Known limitations

  • 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.

Usage examples

Initialize

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

Run a backup job

Cron

Cronjob performing a pull backup job

Synopsis and options

init

run

update

info

purge

destroy

transfer

About

Incremental btrfs snapshot backups with push/pull support via SSH

License:GNU General Public License v2.0


Languages

Language:Python 100.0%