BackupPC-users

Re: [BackupPC-users] Exclude complexity in version 2.1.2pl1

2008-12-11 20:08:11
Subject: Re: [BackupPC-users] Exclude complexity in version 2.1.2pl1
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 11 Dec 2008 19:51:57 -0500
John Rouillard wrote at about 17:48:02 +0000 on Thursday, December 11, 2008:
 > On Thu, Dec 11, 2008 at 12:14:48AM -0800, Craig Barratt wrote:
 > > James writes:
 > > 
 > > > I have the following config line:
 > > > 
 > > > $Conf{BackupFilesExclude} = ['/proc', '/mnt', '/sys', '/home/
 > > > users',  ... , '+ /vz/dump', '/vz/*'];
 > > > 
 > > > But there is no /vz/dump in the backups.  What am I doing wrong?
 > > 
 > > You can't use the rsync syntax (+/-) in $Conf{BackupFilesExclude}.
 > > You can use $Conf{RsyncArgs} directly if you want.
 > > 
 > > Craig
 > 
 > Craig, it may not be intended to work, but in the current 3.x series
 > it does.
 > 
 > For example:
 > 
 > $Conf{BackupFilesExclude} = {
 >   '/var/log' => [
 >     '/nagios'
 >   ],
 >   '/home/yum' => [
 >      "+ /bin/**",
 >      "+ /SRPMS/**",
 >      "+ /install/kickstart/**",
 >      "+ /solaris_software/**",
 >      "- **/.svn/",
 >      "- /repository/**/core/**",
 >      "- /repository/**/core.orig/**",
 >      "- /repository/**/updates/",
 >      "- /repository/**/updates-test/**",
 >      "- /repository/**/xxx*/**",
 >      "- /repository/**/yyy-dev/**",
 >      "+ /repository/**/RPMS/**.rpm",
 >      "+ */",
 >      "- *",
 >    ]
 > };
 > 
 > works fine. The trick is that the arguments are passed to --exclude
 > and --exclude "+ something" acts as an include after it is shipped to
 > the remote rsync process.
 > 
 > This is really the only way to get a complex set of include/exclude
 > rules to rsync for backup needs.
 > 
 > Since you're the author of backuppc, I assume this wasn't intentional
 > but it does work and is very useful. I think Holger pointed it out in
 > an earlier email on this list and there are a few of us using it
 > AFAICT.
 > 
 > If RsyncArgs was settable/augmentable on a per share basis that would
 > also work. Something like:
 > 
 > $Conf{RsyncArgs} = "/path to rsync --and --common --options $RsyncShareArgs"
 > 
 > with 
 > 
 > $Conf{RsyncArgs} = {
 >   '/var/log' => [
 >     '--exclude /nagios'
 >   ],
 >   '/home/yum' => [
 >      "--include '/bin/**"',
 >      "--include '/SRPMS/*'*",
 >      ...
 >    ]
 > };
 > 
 > would be welcome as well as I could set bwlimits on a perhost
 > basis. Right now I have to override the whole RsyncArgs setting and
 > when I update it in the main config file I have to search and update
 > it in any pc/*.pl files I overrode it in.
 > 
 > -- 
 >                              -- rouilj
 > 
 > John Rouillard
 > System Administrator
 > Renesys Corporation
 > 603-244-9084 (cell)
 > 603-643-9300 x 111
 > 
I can't help you on a per share basis, but I posted last week about a
trick to use perl code and symlinks to be able to use a single config
file that uses arbitrary perl conditions to set parameters by host.

------------------------------------------------------------------------------
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>