Created
February 12, 2020 08:45
-
-
Save grzegorznowak/446a3e58960d10e3a07b631a0c39d319 to your computer and use it in GitHub Desktop.
Remove all the syncoid created snapshots. Uses specific syncoid's pattern, so make sure you it doesn't clash with anything else you use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ARR=($(zfs list -t snapshot -o name -s name | grep -i -o ".*@syncoid_build.*")) | |
for i in "${ARR[@]}" | |
do | |
echo "Getting rid of snapshot $i..." | |
echo "zfs destroy -R $i" | |
zfs destroy -R "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment