Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--destroy-only doesn't work as expected #66

Open
gpothier opened this issue Mar 15, 2017 · 6 comments
Open

--destroy-only doesn't work as expected #66

gpothier opened this issue Mar 15, 2017 · 6 comments

Comments

@gpothier
Copy link

Hi!
The --destroy-only flag does not seem to work as expected. There are two issues:

  • When using // as a a filesystem name, nothing happens. This is what the log says:

gpothier@heracles:~/zfs-auto-snapshot-master$ sudo zfs-auto-snapshot --destroy-only --label=min15 --keep=4 -r -d //
Debug: Including tambor for recursive snapshot.
Debug: Excluding tambor/caligrafix because tambor includes it recursively.
Debug: Excluding tambor/luki because tambor includes it recursively.
Debug: Excluding tambor/pub because tambor includes it recursively.
Debug: Excluding tambor/ssdcaligrafix because tambor includes it recursively.
Recursively destroying all but the newest 4 snapshots of tambor
@zfs-auto-snap_min15-2017-03-15-0015, 0 created, 0 destroyed, 0 warnings.

  • When using explicit filesystem names instead of //, the program destroys one more snapshot than it should. Eg. if I put --keep=4, I end up with 3 snapshots.
@andrewbauman
Copy link

Hello
I have same issue
useing Proxmox 4.3 flavor of Debain

@andrewbauman
Copy link

the code below does the job. Adjust the pool/data, auto-snap_tag, and second tail to suit.

for data in zfs list -H -o name -t filesystem,volume -r pool/data | tail -n +2 ; do for snap in zfs list -S creation -H -o name -t snapshot -r $data | grep "@auto-snap_tag" | tail -n +5; do echo -n "Destroying $snap..."; zfs destroy -d $snap; echo " Done."; done; done

@ewwhite
Copy link

ewwhite commented Aug 6, 2018

I'm running into this too. This doesn't always happen, but it seems to occur on larger filesystems or environments with more than 10 filesystems.

Any thoughts?

@olegbliaher
Copy link

Having the same issue, even without --destroy-only, on Ubuntu 18.04.

@romanshein
Copy link

It seems the issue is forgotten, yet it is still a thing, at least in Proxmox 6.4.

@andrewbauman
Copy link

I switched to https://github.com/jimsalterjrs/sanoid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants