kimono-koans/httm

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

Closed this issue · 7 comments

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:

  • httm 0.37.0
  • OS: Manjaro using httm-bin package
  • Relevant filesystem/s: btrfs
  • httm --debug output if applicable:
    % sudo httm --debug
    Error: No snaps found for mount: "/var/lib/docker/btrfs"

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

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.

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)

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

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?

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