BackupPC-users

Re: [BackupPC-users] BackupFilesExclude not working as expected

2012-06-06 10:32:23
Subject: Re: [BackupPC-users] BackupFilesExclude not working as expected
From: Adam Goryachev <mailinglists AT websitemanagers.com DOT au>
To: backuppc-users AT lists.sourceforge DOT net
Date: Thu, 07 Jun 2012 00:30:57 +1000
On 07/06/12 00:22, Aaron Cossey wrote:
> On Tue, Jun 5, 2012 at 6:50 PM, Bowie Bailey <Bowie_Bailey AT buc DOT com> 
> wrote:
>> On 6/5/2012 5:41 AM, Aaron Cossey wrote:
>>> Hello,
>>>
>>> OS: Debian 6
>>> Backuppc: version 3.1.0
>>>
>>> I have a host configured with XferMethod = rsync . The backup works
>>> but I noticed that the BackupFilesExclude which I have configured are
>>> not being used.
>> The syntax of BackupFilesExclude is frequently confusing to new users.
>> Show us what yours actually looks like and we'll fix it for you if needed.
>>
>> --
>> Bowie
>>
> Thank you Bowie.
>
> This is the specific config for the host:
>
> $Conf{BackupFilesExclude} = {
>   '/' => [
>     'www/vhosts/2Burn',
>     'www/vhosts/preview* ',
>     'www/vhosts/www*',
>     'www/vhosts/adrdb*',
>     'www/vhosts/db_dumps_for_backup'
>   ],
> };
> $Conf{BackupFilesOnly} = {
>   '/' => [
>     '/srv'
>   ]
> };
This is ignored since the key "/" does not match the RsyncShareName
"/srv", in any case I would advise to delete it anyway as it is not needed.

> $Conf{ClientNameAlias} = 'dev4';
> $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
> $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host
> $rsyncPath $argList+';
> $Conf{RsyncShareName} = [
>   '/srv'
> ];
>
> -Basically I want to get everything under /srv except
> /srv/www/vhosts/2Burn
> /srv/www/vhosts/preview*
> /srv/www/vhosts/www*
> /srv/www/vhosts/adrdb*
> /srv/www/vhosts/db_dumps_for_backup

Try these:

$Conf{RsyncShareName} = [
  '/srv'
];

# This will only backup files under /srv, so no need to set
backupfilesonly....

$Conf{BackupFilesExclude} = {
  '/srv' => [
    'www/vhosts/2Burn',
    'www/vhosts/preview* ',
    'www/vhosts/www*',
    'www/vhosts/adrdb*',
    'www/vhosts/db_dumps_for_backup'
  ],
};

# The key must match the sharename "/srv"

Let us know if this still doesn't do what you would like.

Regards,
Adam

-- 
Adam Goryachev
Website Managers
www.websitemanagers.com.au


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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/