69 days ago · Tech · hide · Fediverse post

Destroy a range of ZFS snapshots with a single command When you have a number of old ZFS snapshots to destroy, it can be useful to see if you can delete a complete range. A range of snapshots can be destroyed with a single command. This is what the man page says: An inclusive range of snapshots may be specified by separating the first and last snapshots with a percent sign. The first and/or last snapshots may be left blank, in which case the filesystem's oldest or newest snapshot will be implied. This requires some careful reading. When omitting the begin or end of the range, it comes down to this: zfs destroy zroot/path/to/set@%snap will destroy all snapshots from the oldest to and including zroot/path/to/set@snap zfs destroy zroot/path/to/set@snap% will destroy all snapshots starting from zroot/path/to/set@snap to and including the newest Destroy old snapshosts When you want to destroy all older snapshots of a data set and only keep the newer ones, just pick the newest snapshot you…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town