Search code examples
rsynczfsbtrfs

Btrfs Snapshot WITH Backup


Is there a way to backup a btrfs file system by copying the entire disk over at first backup, but then copying over snapshot files in place of using rsync (or is this a bad idea)?


Solution

  • You can definitely do this, though rsync will duplicate some blocks on the new system.

    You might be interested in Buttersink. ButterSink is like rsync, but for btrfs subvolumes instead of files, which makes it much more efficient for things like archiving backup snapshots. It is built on top of btrfs send and receive capabilities. Sources and destinations can be local btrfs file systems, remote btrfs file systems over SSH, or S3 buckets.

    For example, the following will copy over just snapshot differences to the remote machine, and create an efficient mirror of your snapshots there:

    buttersink /home/snaps/  ssh://backup-server/bak/snaps/