kimono-koans / httm

Interactive, file-level Time Machine-like tool for ZFS/btrfs/nilfs2 (and even Time Machine and Restic backups!)
https://crates.io/crates/httm
Mozilla Public License 2.0
1.36k stars 29 forks source link

Possible to support btrbk with snapshot names without '/snapshot/' suffix? #69

Closed phirsch closed 1 year ago

phirsch commented 1 year ago

Is your feature request related to a problem? Please describe. On my NixOS system, snapshot directories have the following naming scheme (with a 'typical' configuration, i.e. just specifying the target folder for snapshots, no other extra option set):

@/@nixos/@home/.snapshots/user.20230101T2359/, as opposed to @/@nixos/@home/.snapshots/user.20230101T2359/snapshot/, which httm seems to require.

Describe the solution you'd like Is there any way to configure httm to use this folder layout? If not, would it be possible to support this?

Describe alternatives you've considered I could probably change my system config to follow your convention, but it would be great to support the convention used by NixOS out of the box.

Thanks!

kimono-koans commented 1 year ago

Thanks for this bug report.

httm should support all btrfs layouts.

I think the issue here is you have a what appears to httm as a Snapper layout because you are using the .snapshots directory. The Snapper .snapshots layout has its own path, because it's faster than calling btrfs subvolume list -a -s ... on each btrfs volume to find its snapshot subvolumes.

And, yes, the way you might test to confirm is by trying with a different layout. Please do so.

Once confirmed, I guess I may tear out the Snapper path, or better detect whether it is there.

Also -- are you viewing these snapshots locally or over a network?

kimono-koans commented 1 year ago

You might try building from this branch: https://github.com/kimono-koans/httm/tree/btrbk_nix

kimono-koans commented 1 year ago

This should fix. Feel free to reopen if it doesn't.

https://github.com/kimono-koans/httm/pull/70