I am experimenting with zfs
The snapshots were created using the following command:
The number of snapshots are not large but I decided to eliminate them anyway. The documentation seems to imply that one cannot do anything along the lines of
Is one required to write a script to iteritively find and destroy each snapshot?
A. Apparently the answer is YES. I found such a script on github named
send | receive
and I have created multiple snapshots of a test file system. I would like to get rid of them all.The snapshots were created using the following command:
Code:
export XFRDATE="$(date +'%Y-%m-%d_%H-%M-%S')" && \
zfs snapshot -r zroot/iocage/jails/testjail2@send_rcv_host_xfr_"$XFRDATE
The number of snapshots are not large but I decided to eliminate them anyway. The documentation seems to imply that one cannot do anything along the lines of
zfs destroy -rp zroot/iocage/jails/testjail2@send_rcv_host_xfr_*
. At least I am unable to get this to work.
Code:
zfs destroy -npr zroot/iocage/jails/testjail2@send_rcv_host_xfr\*
could not find any snapshots to destroy; check snapshot names.
zfs destroy -npr zroot/iocage/jails/testjail2@send_rcv_host_xfr*
could not find any snapshots to destroy; check snapshot names.
Is one required to write a script to iteritively find and destroy each snapshot?
A. Apparently the answer is YES. I found such a script on github named
zfs-prune-snapshots
.