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

Custom naming format for snapshots #494

Open Massimo-B opened 1 year ago

Massimo-B commented 1 year ago

Currently my snapshots are names like this using timestamp_format long-iso:

ID 548 gen 26991 top level 265 path snapshots/mhr2/home/home.20220707T050000+0200
ID 549 gen 26991 top level 265 path snapshots/bch2/root/root.20220707T050000+0200
ID 554 gen 23569 top level 265 path snapshots/desk/data/data.20220707T050000+0200

I would like to have snapshots/desk/data/20220707T050000+0200 only. Either you could add support for a custom naming scheme but that could have issues when changing the scheme later and btrbk would not find the subvolumes anymore. Or you could just add a switch to have a long or a short format.

I guess the snapshot name is constructed from variables subvolume and snapshot_dir or target send-receive:

volume /mnt/btrfs-top-lvl/
# ...
        snapshot_dir            snapshots/root
# ...
        target send-receive     /mnt/usb/mobiledata/snapshots/bch2/root
KweezyCode commented 3 weeks ago

any changes? i need this too