btrbk icon indicating copy to clipboard operation
btrbk copied to clipboard

snapshots from snap-sync used for incremental transfer

Open MarkoSchuetz opened this issue 3 years ago • 1 comments

I have a volume that is mounted on /mnt/forBackup. It has subvolumes @, @home, and @myStuff. I configured the time machine setup:

timestamp_format long snapshot_preserve_min 18h snapshot_preserve 48h

volume /mnt/forBackup snapshot_dir btrbk_snapshots subvolume @ subvolume @home subvolume @myStuff

Then I wanted to backup the snapshots to an external USB drive, so I added configuration /etc/btrbk/btrbk-backup.conf with

target_preserve_min no target_preserve 0d 10w *m

volume /mnt/forBackup target /run/media/marko/Backup-2 subvolume @ snapshot_dir btrbk_snapshots snapshot_preserve_min all snapshot_create no subvolume @home snapshot_dir btrbk_snapshots snapshot_preserve_min all snapshot_create no subvolume @myStuff snapshot_dir btrbk_snapshots snapshot_preserve_min all snapshot_create no

When I run btrbk with -c /etc/btrbk/btrbk-backup.conf --progress I see that only 15GB are transferred for @, 1.3GB for @home, and ~100KB for @myStuff. There is about 900GB in these subvolumes and I would expect the initial transfer to be about that size. Where is my mistake?

Update: It seems that btrbk was incrementing a snapshot that was stored on that same external disk using snap-sync.

MarkoSchuetz avatar Jul 16 '21 15:07 MarkoSchuetz

It seems that btrbk was incrementing a snapshot that was stored on that same external disk using snap-sync.

Yes btrbk does that, ftw. If any related subvolume is already present on target (even outside of the configured directories), it will use it for incremental transfers. You can disable this behavior by explicitly configuring incremental_resolve directory, or even incremental no (there is usually no real reson for this).

digint avatar Aug 06 '21 12:08 digint