<?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; rsync</title>
	<atom:link href="http://slagwerks.com/blog/index.php/tag/rsync/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>
		<item>
		<title>latest macports rsync is actually getting all OS X metadata</title>
		<link>http://slagwerks.com/blog/index.php/2008/10/21/rsync-andor-leopard-closer-yet-to-getting-all-os-x-metadata/</link>
		<comments>http://slagwerks.com/blog/index.php/2008/10/21/rsync-andor-leopard-closer-yet-to-getting-all-os-x-metadata/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 20:34:35 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Tech Stuff]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Backup Bouncer]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://slagwerks.com/blog/?p=138</guid>
		<description><![CDATA[Update: I&#8217;d forgotten to check the flags that had been missing from the macport version last time around, but they&#8217;re all there. Now, running rsync -aNHAXx --fileflags --force-change /Volumes/Src/ /Volumes/rsync3test passes every bbouncer test!&#160;Cool. Original post: On Leopard (10.5.5) using rsync 3.0.4 from macports, a few more tests are passing backup bouncer 0.1.3 (compare to [...]]]></description>
			<content:encoded><![CDATA[<p><em>Update: </em>I&#8217;d forgotten to check the flags that had been missing from the macport version last time around, but they&#8217;re all there. Now, running <code>rsync -aNHAXx --fileflags --force-change /Volumes/Src/ /Volumes/rsync3test</code> passes every bbouncer test!&nbsp;Cool.</p>
<p><em>Original post:</em> On Leopard (10.5.5) using rsync 3.0.4 from macports, a few more tests are passing backup bouncer 0.1.3 (compare to <a href="http://slagwerks.com/blog/index.php/2008/06/10/latest-rsync-looking-good-for-os-x-metadata/">my June&nbsp;post</a>):</p>
<pre><code>
$ sudo ./bbouncer verify -d /Volumes/Src/ /Volumes/rsync3test/
Verifying:    basic-permissions ... ok (Critical)
Verifying:           timestamps ... ok (Critical)
Verifying:             symlinks ... ok (Critical)
Verifying:    symlink-ownership ... ok
Verifying:            hardlinks ... ok (Important)
Verifying:       resource-forks ...
   Sub-test:             on files ... ok (Critical)
   Sub-test:  on hardlinked files ... ok (Important)
Verifying:         finder-flags ... ok (Critical)
Verifying:         finder-locks ... FAIL
Verifying:        creation-date ... FAIL
Verifying:            bsd-flags ... ok
Verifying:       extended-attrs ...
   Sub-test:             on files ... ok (Important)
   Sub-test:       on directories ... ok (Important)
   Sub-test:          on symlinks ... ok
Verifying: access-control-lists ...
   Sub-test:             on files ... ok (Important)
   Sub-test:              on dirs ... ok (Important)
Verifying:                 fifo ... ok
Verifying:              devices ... ok
Verifying:          combo-tests ...
   Sub-test:  xattrs + rsrc forks ... ok
   Sub-test:     lots of metadata ... ok
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://slagwerks.com/blog/index.php/2008/10/21/rsync-andor-leopard-closer-yet-to-getting-all-os-x-metadata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>latest rsync looking good for OS X metadata</title>
		<link>http://slagwerks.com/blog/index.php/2008/06/10/latest-rsync-looking-good-for-os-x-metadata/</link>
		<comments>http://slagwerks.com/blog/index.php/2008/06/10/latest-rsync-looking-good-for-os-x-metadata/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 19:02:45 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Backup Bouncer]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://slagwerks.com/blog/?p=56</guid>
		<description><![CDATA[As regular readers saw earlier, I&#8217;ve been casting about trying to find an open source backup solution that handles OS X metadata reliably. Having been disappointed by rdiff-backup, I&#8217;ve turned by eyes to the similar rsnapshot project, which uses the venerable&#160;rsync. Since macports includes the latest version of rsync, 3.0.2, I gave it a try [...]]]></description>
			<content:encoded><![CDATA[<p>As regular readers <a href="http://slagwerks.com/blog/index.php/tag/backup/">saw earlier</a>, I&#8217;ve been casting about trying to find an open source backup solution that handles <span class="caps">OS</span> X metadata reliably. Having been disappointed by rdiff-backup, I&#8217;ve turned by eyes to the similar rsnapshot project, which uses the venerable&nbsp;rsync. </p>
<p>Since macports includes the latest version of rsync, 3.0.2, I gave it a try with the familiar <code>rsync -avz /from /to</code> syntax, but it performed disappointingly on n8&#8217;s handy Backup Bouncer test suite. <a href="http://www.bombich.com/mactips/rsync.html">Thanks to Mike Bombich</a>, I learned about some extra flags to add (though my copy of rsync doesn&#8217;t seem to know about the -N or&thinsp;&#8212;&thinsp;fileflags he&nbsp;has):</p>
<pre><code>
$ sudo rsync -aHAXx  /Volumes/Src/ /Volumes/rsynctest/
$ ./bbouncer verify -d /Volumes/Src/ /Volumes/rsynctest/
Verifying:    basic-permissions ... ok
Verifying:           timestamps ...
   Sub-test:    modification time ... ok
ok
Verifying:             symlinks ... ok
Verifying:    symlink-ownership ... ok
Verifying:            hardlinks ... ok
Verifying:       resource-forks ... ok
Verifying:         finder-flags ... ok
Verifying:         finder-locks ... FAIL
Verifying:        creation-date ... FAIL
Verifying:            bsd-flags ... FAIL
Verifying:       extended-attrs ...
   Sub-test:             on files ... ok
   Sub-test:       on directories ... ok
   Sub-test:          on symlinks ... ok
ok
Verifying: access-control-lists ...
   Sub-test:             on files ... ok
   Sub-test:              on dirs ... ok
ok
Verifying:                 fifo ... FAIL
Verifying:              devices ... FAIL
Verifying:          combo-tests ...
   Sub-test:  xattrs + rsrc forks ... ok
   Sub-test:     lots of metadata ... ok
ok
</code></pre>
<p>Sure, there are a few <span class="caps">FAILS</span> in there, but they&#8217;re not&nbsp;<em>important:</em></p>
<pre><code>
$ ./bbouncer verify -T important -d /Volumes/Src/ /Volumes/rsynctest/
Verifying:    basic-permissions ... ok
Verifying:           timestamps ...
   Sub-test:    modification time ... ok
ok
Verifying:             symlinks ... ok
Verifying:            hardlinks ... ok
Verifying:       resource-forks ... ok
Verifying:         finder-flags ... ok
Verifying:       extended-attrs ...
   Sub-test:             on files ... ok
   Sub-test:       on directories ... ok
   Sub-test:          on symlinks ... ok
ok
Verifying: access-control-lists ...
   Sub-test:             on files ... ok
   Sub-test:              on dirs ... ok
ok
</code></pre>
<p>(note the <code>-T important</code> flag telling Backup Bouncer to remove the extra-finicky tests). Good enough! On to get familiar with&nbsp;rsnapshot.</p>
]]></content:encoded>
			<wfw:commentRss>http://slagwerks.com/blog/index.php/2008/06/10/latest-rsync-looking-good-for-os-x-metadata/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
