digint / btrbk

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

[feature request] additional snapshot naming options #526

Open dkebler opened 1 year ago

dkebler commented 1 year ago

I'd like to have a conf file for making the occasional point in time full snapshots that I might like to use say on other machines.

I tried snapshot_name but had to add a snapshot name with a hard coded name for each subvolume entry to get that to work as I intended.

so I guess I'm asking for some additional naming options snapshot_suffix <name> snapshot_prefix <name> and while I am asking another option might be
snapshot_basename this would strip any directory from the subvolume path when creating the snapshot name/path.

For example

snapshot_suffix base   # applies to all subsequent subvolumes requested
snapshot_prefix manjaro   # applies to all subsequent subvolumes requested
snapshot_basename  # applies to all subsequent subvolumes requested
subvolume @shell
subvolume common/@home
subvolume manjaro/@opt
subvolume manjaro/@rootfs

would result in

manjaro-@shell-base.XXX
majaro-@home-base.XXX
majaro-@opt-base.XXX
manjaro-@rootfs-base.XXX

BTW this is an excellent project, well coded and documented. I'm a btrfs noob and it is a great tool.

I'm very good at bash scripts but know nothing about perl but I'm willing to help if only a PR for the updated docs.