Harry Putnam wrote on 01/10/2014 09:52: > This is not so easy to find in google searches > > How does one go about destroying all but a specific snapshot? The one > I want is somewhere in the middle timewise So not wanting to use > `destroy -r'. > > This is in a .zfs/snapshot/* where there are many auto snaps. So > looking for a way besides destroying -r or 1 by 1.
Hi Harry, Simplest option would be something like zfs list -t snapshot -o name -H -r filesystem/path > /tmp/snaplist.txt edit /tmp/snaplist.txt to remove the snapshot you want to keep for SNAP in `cat /tmp/snaplist.txt` do zfs destroy $SNAP done My syntax may be a little off with the for loop but I'm sure you get the idea. Cheers Tim -- Tim Aslat <t...@spyderweb.com.au> Spyderweb Consulting http://www.spyderweb.com.au Mobile: +61 0401088479 _______________________________________________ openindiana-discuss mailing list openindiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss