btrbk
btrbk copied to clipboard
optionally use the full subvolume path as default snapshot_name
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?
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...)
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. :-)
Implementation proposal in https://github.com/digint/btrbk/pull/342