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.35k stars 29 forks source link

Using with btrbk: Error: No snaps found for mount: "/var/lib/docker/btrfs" #108

Closed HaleTom closed 6 months ago

HaleTom commented 6 months ago

I use btrbk for creating hourly snapshots of my btrfs filesystem.

httm doesn't seem able to find any snapshots:

% sudo httm --list-snaps
Error: No snaps found for mount: "/var/lib/docker/btrfs"
%
% ls /mnt/btrfs-vol/home/btrbk/home | head -n3
home.20240218T1346/  home.20240228T1400/  home.20240302T2302/
home.20240219T0901/  home.20240228T1500/  home.20240303T0000/
home.20240220T1650/  home.20240228T1600/  home.20240303T1425/

I read the man page, but couldn't find a way to specify where to look for my snapshots.


Additional context Add any other context about the problem here. Perhaps you should include system details like:

HaleTom commented 6 months ago

Reading #102 didn't seem to shed any light.

kimono-koans commented 6 months ago

I recently modified httm to return errors for certain btrfs conditions, when perhaps warnings would have been more appropriate.

I'm certain your issue stems from this. I will merge fixes soon. Until then, I've started a branch to modify all such conditions which might result in an error to just spew a warning. See: https://github.com/kimono-koans/httm/tree/fix_btrfs_errors

If I were you, I'd give this branch a shot to be certain it resolves your issue. Instructions on how to build from source are contained within the README

Thanks for your bug report.

HaleTom commented 6 months ago

I seem to be having issues with this command:

% cargo install --locked --git https://github.com/kimono-koans/httm.git --tag fix_btrfs_errors
    Updating git repository `https://github.com/kimono-koans/httm.git`
error: failed to find tag `fix_btrfs_errors`

Caused by:
  reference 'refs/remotes/origin/tags/fix_btrfs_errors' not found; class=Reference (4); code=NotFound (-3)
HaleTom commented 6 months ago

GPT to the rescue -- I needed --branch not --tag in this instance.

kimono-koans commented 6 months ago

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

kimono-koans commented 6 months ago

FYI, you're also executing without specifying a path/s. httm operates like sort or cat in that it will accept input from stdin. This is so find /usr/bin | httm just works. --list-snaps is also a ZFS only option. One which you can get with btrfs sub list /mnt. See the README and --help for more information. Perhaps start with something simple like httm ~/.zshrc?

HaleTom commented 6 months ago

@kimono-koans I confirm that fix_btrfs_errors does proceed to list some snapshots. Cheers!