<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Solutions Log &#187; snapshots</title>
	<atom:link href="http://solutions.unixsherpa.com/tag/snapshots/feed/" rel="self" type="application/rss+xml" />
	<link>http://solutions.unixsherpa.com</link>
	<description>by Dan Reiland</description>
	<lastBuildDate>Fri, 16 Apr 2010 20:28:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Remove a Range of Unwanted ZFS Snapshots from the Command Line</title>
		<link>http://solutions.unixsherpa.com/2009/11/25/remove-a-range-of-unwanted-zfs-snapshots-from-the-command-line/</link>
		<comments>http://solutions.unixsherpa.com/2009/11/25/remove-a-range-of-unwanted-zfs-snapshots-from-the-command-line/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 05:51:41 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[snapshots]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://solutions.unixsherpa.com/?p=218</guid>
		<description><![CDATA[Remove a range of unwanted snapshots, from the command line, if necessary. In the following example, all automatic snapshots in the bash shell are removed. for s in $&#40;zfs list -H -o name -t snapshot &#124; grep @zfs-auto-snap&#41;; do zfs destroy $s; done One could add a secondary pipe and grep statement to filter on [...]]]></description>
			<content:encoded><![CDATA[<p>Remove a range of unwanted snapshots, from the command line, if necessary.<br />
In the following example, <strong>all</strong> automatic snapshots in the bash shell are removed.</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">for</span> s <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>zfs list <span style="color: #660033;">-H</span> <span style="color: #660033;">-o</span> name <span style="color: #660033;">-t</span> snapshot <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #000000; font-weight: bold;">@</span>zfs-auto-snap<span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #000000; font-weight: bold;">do</span> zfs destroy <span style="color: #007800;">$s</span>; <span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>One could add a secondary pipe and grep statement to filter on individual file systems.</p>
<p>Reference: <a href="http://wikis.sun.com/display/OpenSolarisInfo200906/How+to+Manage+the+Automatic+ZFS+Snapshot+Service">How to Manage the Automatic ZFS Snapshot Service</a></p>
]]></content:encoded>
			<wfw:commentRss>http://solutions.unixsherpa.com/2009/11/25/remove-a-range-of-unwanted-zfs-snapshots-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
