BackupPC-users

Re: [BackupPC-users] BackupFilesExcludes for Linux

2008-12-08 19:49:54
Subject: Re: [BackupPC-users] BackupFilesExcludes for Linux
From: Mark Adams <mark9117 AT gmail DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 08 Dec 2008 17:48:14 -0700
Jeffrey J. Kosowsky wrote:
> Holger Parplies wrote at about 00:24:56 +0100 on Tuesday, December 9, 2008:
>  > Hi,
>  > 
>  > Mark Adams wrote on 2008-12-08 14:37:54 -0700 [Re: [BackupPC-users] 
> BackupFilesExcludes for Linux]:
>  > > I think I spotted a mistake in my own speculative config.  See below.
>  > 
>  > right, and there's a second one along the same line ...
>  > 
>  > > [...]
>  > > > $Conf{BackupFilesOnly} = {
>  > > >   '/mnt/share' => [
>  > > >     'images',
>  > > >     'Photos'
>  > > >   ]
>  > > >  '/' => [
>  > > >    'etc'
>  > > >   ]
>  > > >  '/home' => [
>  > > >   'madams'
>  > > >   ]
>  > > > };
>  > > > $Conf{BackupFilesExclude} = {
>  > > >  '/home/madams' => ['/torrent', '/Download'],
>  > 
>  > This should be
>  > 
>  >      '/home' => [ '/maddams/torrent', '/maddams/Download' ],
>  >  
>  > > >  };
>  > > > $Conf{RsyncShareName} = [
>  > > >   '/mnt/share', '/home', '/'
>  > [edited to match your correction]
>  > > > ];
>  > > > $Conf{ClientNameAlias} = '192.168.1.106';
>  > 
>  > As Matthias probably meant to point out, you can achieve the same with
>  > 
>  >     $Conf {RsyncShareName} = [ '/etc', '/home/maddams', 
> '/mnt/share/images',
>  >                           '/mnt/share/Photos' ];
>  >     $Conf {BackupFilesExclude} = { '/home/maddams' => [ '/torrent',
>  >                                                    '/Download'] };
>  > 
>  > or even
>  > 
>  >     $Conf {RsyncShareName} = [ '/' ];
>  >     $Conf {BackupFilesOnly} = {
>  >    '/' => [ '/etc', '/home/maddams', '/mnt/share/images',
>  >             '/mnt/share/Photos' ],
>  >     };
>  >     $Conf {BackupFilesExclude} = {
>  >    '/' => [ '/home/maddams/torrent', '/home/maddams/Download' ],
>  >     };
>  > 
>  > This is, of course, just as speculative as your config, but I believe it
>  > *should* work that way :-).
>  > 
>  > The important part is that the hash keys in BackupFilesOnly and
>  > BackupFilesExclude need to match your {RsyncShareName}s exactly, else they
>  > will simply be ignored (there is no magic that determines that 
> '/home/maddams'
>  > lies within the '/home' share). Aside from that, *with rsync and tar* (not
>  > rsyncd and smb) you are rather free to split your paths into share names 
> and
>  > BackupFilesOnly entries any way you like. Less shares probably means less
>  > overhead and a backup definition that is easier to understand. If you use
>  > '--one-file-system', you will need extra shares for anything on different 
> file
>  > systems (probably '/home' and '/mnt/share' in your case).
>  > 
>
> Also (I believe that) using multiple share names on the same
> filesystem will not preserve hard links that are split across the
> share names. So, if you are backing up your linux partitions and want
> to preserve hard links then you should probably keep all the key root
> partitions on the same share (please correct me if I am wrong but I
> don't see how rsync would otherwise know about the hard links since
> each share is done independently).
>
>   
Thanks for the tip Jeff.  I think I understand what you're saying here 
about preserving hard links, but I'm still just learning a thing or two 
about rsync. Just for the sake of simplicity, I adapted Holger's design 
as below.  I stated an incremental backup of that config about 30 
minutes ago and things look good at this point.  I believe it's a winner.

I've got two more machines to configure for backup and then I just ride 
it for another six months until I have to upgrade again.  Thanks to all 
you folks for the help. I really do appreciate it.


# cat spike.pl
$Conf {RsyncShareName} = [ '/' ];
$Conf {BackupFilesOnly} = {
        '/' => [ '/etc', '/home/madams', '/mnt/share/images', 
'/mnt/share/Photos' ],
       };
$Conf {BackupFilesExclude} = {
        '/' => [ '/home/madams/torrent', '/home/madams/Download' ],
       };


-- 
Mark E. Adams

Random Musing: 
Did you know that for the price of a 280-Z you can buy two Z-80's?
                -- P.J. Plauger



------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>