<?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>magnus-pedersen.dk &#187; DeltaCopy</title>
	<atom:link href="http://magnus-pedersen.dk/tag/deltacopy/feed/" rel="self" type="application/rss+xml" />
	<link>http://magnus-pedersen.dk</link>
	<description>Fortytwo</description>
	<lastBuildDate>Sun, 04 Dec 2011 16:29:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>rsync and backup</title>
		<link>http://magnus-pedersen.dk/2010/01/rsync-and-backup/</link>
		<comments>http://magnus-pedersen.dk/2010/01/rsync-and-backup/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 15:35:32 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[DeltaCopy]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://magnus-pedersen.dk/?p=605</guid>
		<description><![CDATA[The setup is: Clients -&#62; Server -&#62; NAS. ssh from Client to server, cifs from server to NAS. First bit, make ssh keypairs for the clients, if the backup-process is supposed to be unsupervised, then make keypairs without passwords. Then I needed to fiddle with the backup-share, permissions screwed with rsync, generating a lot of [...]]]></description>
			<content:encoded><![CDATA[<p>The setup is: Clients -&gt; Server -&gt; NAS. ssh from Client to server, cifs from server to NAS.</p>
<p>First bit, <a title="ssh" href="http://sial.org/howto/openssh/publickey-auth/" target="_blank">make ssh keypairs</a> for the clients, if the backup-process is supposed to be unsupervised, then make keypairs without passwords. Then I needed to fiddle with the backup-share, permissions screwed with rsync, generating a lot of noise in the log. Stuff got backed up though. Heres what my backupscript ended up looking like:</p>
<blockquote>
<div id="_mcePaste">#!/bin/sh</div>
<div id="_mcePaste"># for copy from CLIENTBACKUPDIR to /mnt/Backup/$BACKUPUSER directory on server</div>
<div id="_mcePaste">CLIENTBACKUPDIR=XXX</div>
<div id="_mcePaste">BACKUPUSER=XXX</div>
<div id="_mcePaste">SERVERHOST=URL</div>
<div id="_mcePaste">SSHUSER=XXX</div>
<div id="_mcePaste">cd $HOME || exit 1</div>
<div id="_mcePaste">rsync &#8211;delete &#8211;exclude-from=$HOME/.rsync/exclude-backup \</div>
<div id="_mcePaste">&#8211;timeout=999 -azu \</div>
<div id="_mcePaste">-e &#8220;ssh -l $SSHUSER -i .ssh/backup -ax -o ClearAllForwardings=yes&#8221; \</div>
<div id="_mcePaste">$HOME/ $SERVERHOST:/mnt/Backup/$BACKUPUSER</div>
</blockquote>
<div>The $HOME/.rsync/exclude-backup file looks something like this:</div>
<blockquote>
<div>
<div>#Backup-excludefile</div>
<div>- /Media/*</div>
<div>- /Music/*</div>
<div>- /.*</div>
</div>
</blockquote>
<div>The path is relative to $HOME</div>
<div>The <a title="cifs" href="http://linux.die.net/man/8/mount.cifs" target="_blank">noperm option</a> made a lot of difference in the /etc/fstab on the server. Otherwise rsync threw up a lot of permission-errors. cifs perhaps isn&#8217;t ideal, but it gives me more options.</div>
<div>This even works with <a title="DC" href="http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp" target="_blank">DeltaCopy</a> on my wifes Win7 netbook. And it was a nobrainer from all of my Debian-machines and my moms Ubuntu netbook.</div>
]]></content:encoded>
			<wfw:commentRss>http://magnus-pedersen.dk/2010/01/rsync-and-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

