<?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>Joe's Amazing Technicolor Weblog &#187; rsnapshot</title>
	<atom:link href="http://slagwerks.com/blog/index.php/tag/rsnapshot/feed/" rel="self" type="application/rss+xml" />
	<link>http://slagwerks.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 23 Jul 2010 22:31:13 +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>rsnapshot &amp; OS X notes, a.k.a. turn tabs back on</title>
		<link>http://slagwerks.com/blog/index.php/2008/10/31/rsnapshot-os-x-notes-aka-turn-tabs-back-on/</link>
		<comments>http://slagwerks.com/blog/index.php/2008/10/31/rsnapshot-os-x-notes-aka-turn-tabs-back-on/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 18:24:38 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[Tech Stuff]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[rsnapshot]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://slagwerks.com/blog/?p=143</guid>
		<description><![CDATA[Because rsync 3 is one of if not the only OS X backup solutions that actually gets all the possible forms of metadata, I&#8217;m in the market for a backup solution that uses it. The current candidate is rsnapshot, a 6000 line perl program (!), conveniently located in macports, that wraps rsync to do smart [...]]]></description>
			<content:encoded><![CDATA[<p>Because rsync 3 is one of if not the only <span class="caps">OS</span> X backup solutions that actually gets all the possible forms of metadata, I&#8217;m in the market for a backup solution that uses it. The current candidate is <a href="http://rsnapshot.org/">rsnapshot</a>, a 6000 line perl program (!), conveniently located in macports, that wraps rsync to do smart backup things like keep snapshots via hard links. Thanks to the <a href="http://oreilly.com/catalog/9780596102463/">O&#8217;Reilly Backup book</a> for pointing me to&nbsp;it.</p>
<ul>
<li>It&#8217;s pretty easy to set up to run locally. The main trick is that the configuration file requires tabs. First time in ~10 years I&#8217;ve had to turn tabs back on in vim (<code>:set&nbsp;noexpandtab</code>).</li>
<li>For <span class="caps">OS</span> X, we want the magic<code> -aNHAXx --fileflags --force-change</code> args to make rsync behave properly with all the&nbsp;metadata.</li>
<li><span class="caps">OS</span> X has a weird directory structure, so if you try to backup <code>/etc</code> you just get the symlink that is to <code>/private/etc</code>, or if you try to exclude something under <code>/var</code>, you miss it because it&#8217;s really <code>/private/var/bigdirectory</code>.&nbsp;Buzzkill.</li>
<li>Lchown.pm is necessary for symlinks to have <a href="http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/rsnapshot-24/could-not-lchown-symlink-89132/">the right ownership in snapshots</a>.&nbsp;<span class="caps">CPAN</span>&#8217;d.</li>
<li>Running things automatically on <span class="caps">OS</span> X as the privileged user is a bit odd, lacking as it does a traditional root account. Sudo does nicely, with <code>NOPASSWD: /opt/local/bin/rsnapshot<br />
</code> on the backup machine. For the clients we need <a href="http://troy.jdmz.net/rsnapshot/">appropriate ssh settings</a>, with <a href="http://osdir.com/ml/sysutils.backup.rsnapshot.general/2006-07/msg00029.html">some tricks to run sudo on the remote machine</a>. Getting this running took a while, since I missed the fact that running rsnapshot via sudo on the backup machine meant that rsync would try to use root&#8217;s ssh key, not the backup user&#8217;s&thinsp;&#8212;&thinsp;fixed this with the <code>-i</code> arg to&nbsp;ssh.</li>
<li>Restoring backups is just a matter of copying them from the appropriate snapshot dir, probably using rsync <span class="amp">&amp;</span> the same arguments rsnapshot uses (easily extracted from the rsnapshot&nbsp;log).</li>
<li>Multiple servers are done serially. If you wanted to run backups in parallel, you&#8217;d need one configuration file for every server you&#8217;re backing up, and <a href="http://sourceforge.net/mailarchive/message.php?msg_name=AoEbs7CweQB%40helmut.hullen.de">they each need their own snapshot_root, logfile, and lockfile.</a> For my installation, this&#8217;d be more trouble than it&#8217;s worth.<a href="http://sourceforge.net/mailarchive/message.php?msg_name=AoEbs7CweQB%40helmut.hullen.de"><br />
</a></li>
</ul>
<p>Another issue that temporarily gave me pause, now that we&#8217;ve got everything backed up with presumably correct permissions, is that our off-site backup procedures involve creating tar files <span class="amp">&amp;</span> encrypting them. Fortunately, backup bouncer shows that <span class="caps">OS</span> X tar gets all the important stuff right, though it&#8217;s no rsync&nbsp;v3.</p>
]]></content:encoded>
			<wfw:commentRss>http://slagwerks.com/blog/index.php/2008/10/31/rsnapshot-os-x-notes-aka-turn-tabs-back-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
