Search code examples
backupsnapshotbtrfs

How do I send btrfs snapshots to multiple destination drives?


How do I make a BTRFS incremental backup to multiple source destinations, so I don't have to run btrfs send multiple times?

btrfs send -p /tmp/parent_subvol /tmp/incremental_backup_snapshot | btrfs receive /mnt/destination_drive1
btrfs send -p /tmp/parent_subvol /tmp/incremental_backup_snapshot | btrfs receive /mnt/destination_drive2

Solution

  • in bash:

    btrfs send -p /tmp/parent_subvol /tmp/incremental_backup_snapshot | tee >(btrfs receive /mnt/destination_drive2) | btrfs receive /mnt/destination_drive1
    

    (courtesy this answer)