BackupPC-users

Re: [BackupPC-users] why are excludes sent to rsync when none are present in the config file?

2011-09-19 13:41:41
Subject: Re: [BackupPC-users] why are excludes sent to rsync when none are present in the config file?
From: Raman Gupta <rocketraman AT fastmail DOT fm>
To: backuppc-users AT lists.sourceforge DOT net
Date: Mon, 19 Sep 2011 13:38:57 -0400
On 09/19/2011 01:04 PM, Bowie Bailey wrote:
> On 9/19/2011 11:16 AM, Raman Gupta wrote:
>> On 09/18/2011 10:29 PM, Adam Monsen wrote:
>>> AHA, adding the following entry to BackupFilesOnly '*' worked:
>>>
>>>   /opt/backup/stage/other/*
>>>
>>> Now that directory is backed up. But I don't understand why. :)
>> Because
>>
>> /opt/backup/stage/other
>>
>> backs up the directory entry itself, but not its contents.
>>
>> /opt/backup/stage/other/*
>>
>> backs up the directory entry and contents but not subdirectories.
>>
>> /opt/backup/stage/other/**
>>
>> backs up the directory and all contents, including subdirectories.
>>
>> Do "man rsync" and check out the section "INCLUDE/EXCLUDE PATTERN RULES".
> 
> That's not the behavior that I'm seeing.  I have a linux host that I am
> backing up via rsyncd.  BackupFilesOnly includes "/etc" and a couple of
> other directories.  This successfully backs up the entire subtree on all
> three specified directories.  No asterisks required anywhere.

You are right, my apologies. Please ignore my comments above.

When using BackupFilesOnly BackupPC does some manipulation of the
paths before passing them to rsync, so the normal rsync rules don't apply.

I like to pass my arguments directly to the rsync protocol, so I do:

$Conf{RsyncArgsExtra} = [
            '--exclude-from=$confDir/pc/$host.exclude',
    ];

to create per-client exclude files in the form specified by the rsync
man page, which gives me a bit more control over the arguments as well
as externalizes the includes/excludes into separate files.

Cheers,
Raman

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
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/