<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.hermann-uwe.de" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Uwe Hermann - Simple backups using rsync - Comments</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync</link>
 <description>Comments for &quot;Simple backups using rsync&quot;</description>
 <language>en</language>
<item>
 <title>Two years later...</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-56830</link>
 <description>&lt;p&gt;You have probably perfected the art of doing back-ups0 by now. Time for that blog post with more details?&lt;/p&gt;
</description>
 <pubDate>Sun, 29 Jun 2008 00:36:56 +0200</pubDate>
 <dc:creator>Michaël</dc:creator>
 <guid isPermaLink="false">comment 56830 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Yeah, backup is nice in some</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-18953</link>
 <description>&lt;p&gt;Yeah, --backup is nice in some situations, but not for me in this situation.&lt;/p&gt;
&lt;p&gt;I want to have an (almost) exact copy of my whole file tree on the backup medium, renaming files to .bak etc. would make that a complete mess...&lt;/p&gt;
</description>
 <pubDate>Fri, 26 May 2006 17:38:24 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 18953 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>rsync --backup?</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-18948</link>
 <description>&lt;p&gt;Hi Uwe,&lt;/p&gt;
&lt;p&gt;Enjoy reading your posts. Keep it up.&lt;/p&gt;
&lt;p&gt;Have you ever considered the --backup options in rsync. Very powerful in my view.&lt;/p&gt;
&lt;p&gt;From the man page:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
       -b, --backup&lt;br /&gt;
              With  this  option, preexisting destination files are renamed as&lt;br /&gt;
              each file is transferred or deleted.  You can control where  the&lt;br /&gt;
              backup  file  goes  and what (if any) suffix gets appended using&lt;br /&gt;
              the --backup-dir and --suffix options.&lt;/p&gt;
&lt;p&gt;       --backup-dir=DIR&lt;br /&gt;
              In combination with the --backup option,  this  tells  rsync  to&lt;br /&gt;
              store  all backups in the specified directory. This is very use‐&lt;br /&gt;
              ful for incremental backups.  You  can  additionally  specify  a&lt;br /&gt;
              backup  suffix  using  the  --suffix option (otherwise the files&lt;br /&gt;
              backed up in the specified directory will  keep  their  original&lt;br /&gt;
              filenames).   If  DIR  is a relative path, it is relative to the&lt;br /&gt;
              destination directory (which changes in a recursive transfer).&lt;/p&gt;
&lt;p&gt;       --suffix=SUFFIX&lt;br /&gt;
              This option allows you to override  the  default  backup  suffix&lt;br /&gt;
              used with the --backup (-b) option. The default suffix is a ~ if&lt;br /&gt;
              no --backup-dir was specified, otherwise it is an empty  string.&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Regards.&lt;/p&gt;
</description>
 <pubDate>Fri, 26 May 2006 16:00:54 +0200</pubDate>
 <dc:creator>Inetpro</dc:creator>
 <guid isPermaLink="false">comment 18948 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>I liked also this one very</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-18560</link>
 <description>&lt;p&gt;I liked also this one very much:&lt;br /&gt;
http://www.pollux.franken.de/hjb/rsback/&lt;/p&gt;
&lt;p&gt;which is a similar concept like rsnapshot. It has a different configuration file, you might like that ;-)&lt;/p&gt;
</description>
 <pubDate>Mon, 22 May 2006 22:39:36 +0200</pubDate>
 <dc:creator>Martin Weis</dc:creator>
 <guid isPermaLink="false">comment 18560 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Untrusted media</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-18098</link>
 <description>&lt;p&gt;Ah, ok. I hope you properly wiped the data afterwards, using shred, wipe , dd if=/dev/urandom or some similar method...&lt;/p&gt;
</description>
 <pubDate>Wed, 17 May 2006 14:10:12 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 18098 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>~/.a is for me to know, and</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-18097</link>
 <description>&lt;p&gt;~/.a is for me to know, and for you to find out... or something...&lt;/p&gt;
&lt;p&gt;No.. At this point I didn&#039;t trust the target media, which is why I didn&#039;t backup .gnupg.  I have a few versions of this script, the one I took here was taken when I was at a customers site, and the laptop was starting to behave badly, I needed to make a backup, but didn&#039;t want real sensitive information to be backed up.  So I &quot;borrowed&quot; a machine and backed up to it :) They never knew, but still.....&lt;/p&gt;
&lt;p&gt;/E&lt;/p&gt;
</description>
 <pubDate>Wed, 17 May 2006 10:29:13 +0200</pubDate>
 <dc:creator>Erik</dc:creator>
 <guid isPermaLink="false">comment 18097 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Backup solutions</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-18041</link>
 <description>&lt;p&gt;Hm, maybe I&#039;ll have a look at duplicity, rdiff-backup, and rsnapshot, too... I was under the impression that Amanda was &lt;em&gt;the&lt;/em&gt; backup solution when you have enough time to learn how to use it (Bacula being similar, but with some features which Amanda doesn&#039;t seem to have)...&lt;/p&gt;
&lt;p&gt;I certainly don&#039;t want to have a frontend to rsync, I&#039;m looking for a more sophisticated server/client solution which works nice for &amp;gt;= 10 machines running various Unix-like OSes, Windows, and whatnot, and has the ability for full/incremental backups and restoring data from any point in time...&lt;/p&gt;
&lt;p&gt;Expect a blog post with more details eventually...&lt;/p&gt;
</description>
 <pubDate>Tue, 16 May 2006 23:52:55 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 18041 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>rsync script</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-18040</link>
 <description>&lt;p&gt;Hm, you&#039;re leaking information. What&#039;s in ~/.a? ;)&lt;/p&gt;
&lt;p&gt;Why don&#039;t you backup ~/.gnupg? Is the target media not trustworthy or under your control? Why then, do you backup the rest of your stuff there?&lt;/p&gt;
&lt;p&gt;Anyways, thanks for your script and the --link-dest trick, I&#039;ll try that soon...&lt;/p&gt;
</description>
 <pubDate>Tue, 16 May 2006 23:35:38 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 18040 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Woot</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-18039</link>
 <description>&lt;p&gt;Yeah, yeah. Bow before my Über-hacker skillz ;)&lt;/p&gt;
</description>
 <pubDate>Tue, 16 May 2006 23:30:23 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 18039 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>More useful script</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-18023</link>
 <description>&lt;p&gt;I have a more useful script here.&lt;/p&gt;
&lt;p&gt;rsync supports hardlinking only things that has changed between old versions, and new.  So with some magic you can have a setup where you do a rsync each day, and on the server you&#039;ll find&lt;br /&gt;
2006-01-01/&lt;br /&gt;
2006-01-02/&lt;br /&gt;
2006-01-03/&lt;/p&gt;
&lt;p&gt;And everything that hasn&#039;t changed between these dates are hardlinked together, and will not take any extra space&lt;/p&gt;
&lt;p&gt;Here is a script that does this for you (the magic is --link-dest :) )&lt;/p&gt;
&lt;pre&gt;
#!/bin/bash
# You can call this script with -n to just run in dryrun mode

remotebackdir=/path/to/backup/
remotehost=backuphost
user=$(whoami)

date=$(date --iso-8601)
last=$(ssh $remotehost ls -tr $remotebackdir| grep 200 | tail -1)
if [ &quot;$last&quot; != &quot;&quot; ]; then
        link=&quot;--link-dest=$remotebackdir/$last&quot;
fi
rsync -avb $1 -W -e ssh \
        $link \
        --exclude /.gnupg/ \
        --exclude /.a/ \
        --exclude /.ssh/ \
        --exclude cache/ \
        --exclude Cache/ \
        --exclude Media/ \
        --exclude old/ \
        /home/$user $remotehost:$remotebackdir/$date

rsync -avb $1 -W -e ssh \
        $link \
        --exclude /shadow \
        /etc $remotehost:$remotebackdir/$date
&lt;/pre&gt;&lt;p&gt;
Regards,&lt;br /&gt;
Erik&lt;/p&gt;
</description>
 <pubDate>Tue, 16 May 2006 19:37:40 +0200</pubDate>
 <dc:creator>Erik</dc:creator>
 <guid isPermaLink="false">comment 18023 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Or for that matter, rsnapshot</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-17987</link>
 <description>&lt;p&gt;rsnapshot is also great here; lets you take snapshots at certain points in time and automatically rotates them.&lt;/p&gt;
&lt;p&gt;http://www.rsnapshot.org/&lt;/p&gt;
</description>
 <pubDate>Tue, 16 May 2006 03:35:38 +0200</pubDate>
 <dc:creator>Craig Box</dc:creator>
 <guid isPermaLink="false">comment 17987 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Why not duplicity or rdiff-backup?</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-17951</link>
 <description>&lt;p&gt;Why not duplicity or rdiff-backup? I don&#039;t know your needs of course, but we&#039;ve been using both of them (depending on the requirements) for a while now and they work really nice. What are your requirements for deciding you need Amanda or Bacula? (Not that they&#039;re evil or something, I just think duplicity or rdiff-backup usually do the job as well.)&lt;/p&gt;
</description>
 <pubDate>Mon, 15 May 2006 21:41:01 +0200</pubDate>
 <dc:creator>Tim Stoop</dc:creator>
 <guid isPermaLink="false">comment 17951 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Great!!!</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comment-17950</link>
 <description>&lt;p&gt;Wooot! Now I know! You are my hero. *waving_hands* *evil_grin*&lt;/p&gt;
</description>
 <pubDate>Mon, 15 May 2006 20:44:52 +0200</pubDate>
 <dc:creator>Piotr Esden-Tempski</dc:creator>
 <guid isPermaLink="false">comment 17950 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Simple backups using rsync</title>
 <link>http://www.hermann-uwe.de/blog/simple-backups-using-rsync</link>
 <description>&lt;p&gt;I&#039;m currently looking into &quot;serious&quot; backup solutions (such as &lt;a href=&quot;http://www.amanda.org/&quot;&gt;Amanda&lt;/a&gt; or &lt;a href=&quot;http://bacula.org/&quot;&gt;Bacula&lt;/a&gt;) for work and personal backups. While I may switch to one of those soonishly, I&#039;m currently using a &lt;a href=&quot;http://www.hermann-uwe.de/files/rsync_backup&quot;&gt;pretty simple script&lt;/a&gt; to backup my laptop contents to an external, &lt;a href=&quot;http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian&quot;&gt;dm-crypt/LUKS encrypted&lt;/a&gt; USB hard drive via &lt;a href=&quot;http://samba.anu.edu.au/rsync/&quot;&gt;rsync&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;
#!/bin/sh
#------------------------------------------------------------------------------
# File: rsync_backup
# Author: Uwe Hermann &lt;uwe@hermann-uwe.de&gt;
# URL: http://www.hermann-uwe.de/files/rsync_backup
# License: GNU GPL (http://www.gnu.org/licenses/gpl.html)
# $Id: rsync_backup 511 2006-05-15 16:44:08Z uh1763 $
#------------------------------------------------------------------------------

SOURCE=&#039;/svn /etc /var/www /var/log /root /home&#039;
DEST=/mnt/samsung300gb/backup

time rsync -a --progress --stats --delete-during $SOURCE $DEST
&lt;/pre&gt;&lt;p&gt;
Just to let you know ;)&lt;/p&gt;
</description>
 <comments>http://www.hermann-uwe.de/blog/simple-backups-using-rsync#comments</comments>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1399">amanda</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1404">backup</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1400">bacula</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1402">dm-crypt</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1401">encryption</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1403">hard drive</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1398">rsync</category>
 <pubDate>Mon, 15 May 2006 18:41:15 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">931 at http://www.hermann-uwe.de</guid>
</item>
</channel>
</rss>
