How do I send btrfs snapshots to multiple destination drives?

235 Views Asked by At

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
1

There are 1 best solutions below

0
On BEST ANSWER

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)