digint / btrbk

Tool for creating snapshots and remote backups of btrfs subvolumes
https://digint.ch/btrbk/
GNU General Public License v3.0
1.72k stars 124 forks source link

Backup of backups #594

Open valodiadeseynes opened 4 months ago

valodiadeseynes commented 4 months ago

Hi,

This issue may be related to #560 .

Let's say we have three servers : A, B and C. Server A is production and has its btrfs pool on /mnt/data. Server B uses btrbk to backup subvolume /mnt/data/production from Server A via SSH as per example "Fileserver-initiated Backups from Several Hosts".

Can btrbk be used on Server C to copy the backups from Server B ?

As I understand in the man pages I could run the manual command : btrbk archive source destination

Although it doesn't seem to work if either source or destination is fetched via SSH :

ERROR: Bad argument: not a subvolume declaration: ssh://serverb/mysnapshots

simonwiles commented 3 months ago

I do exactly this. On Server C I execute something like:

btrbk --progress archive <server-b-ip>:/btrbk-backups $LOCAL_TARGET_DIR/btrbk-backups

One issue with this is that it will transfer snapshots from Server B but will not replicate snapshot removals -- i.e. if there is a retention policy on Server B, you have to implement that again on Server C by passing a config file for the purpose:

btrbk --config=server-b-archive.config --progress archive <server-b-ip>:/btrbk-backups $LOCAL_TARGET_DIR/btrbk-backups