btrbk icon indicating copy to clipboard operation
btrbk copied to clipboard

optionally use the full subvolume path as default snapshot_name

Open fallenguru opened this issue 5 years ago • 3 comments

Currently btrbk uses only the subvolume (base)name as a prefix for naming snapshots & backups. The information where a subvolume comes from/goes in the larger fs structure is lost. This might be a problem in naming schemes where the actual subvolume has rather generic names, it's definitely a problem when you have two subvolumes of the same name, e.g. $REALROOT/@home/user1/Documents, $REALROOT/@home/user2/Documents, and so on.

It's possible to set snapshot_name for each affected subvolume, of course, but that's quite fiddly and, considering it has to be set on both ends in a split snapshot-only/pull-only setup, error prone.

How about a config file switch that changes the default snapshot_name to a sensibly escaped version of subvolume-name, the path given in the subvolume section? Something like @home-user1-Documents in the above case?

fallenguru avatar Nov 14 '19 11:11 fallenguru

Sounds useful. Something like snapshot_name_prefix_fullpath [yes|no], or even snapshot_name_prefix_path_from /my/root/path/.

Adding "enhancement" label on this (don't expect it too soon, I'm pretty busy at the moment...)

digint avatar Nov 16 '19 11:11 digint

Oh, I'm not expecting anything! I'm happy as a clam there's a well-tested backup solution that fits my current use-case, so I don't have to roll my own. :-)

fallenguru avatar Nov 18 '19 20:11 fallenguru

Implementation proposal in https://github.com/digint/btrbk/pull/342

LubosKolouch avatar Oct 03 '20 11:10 LubosKolouch