BackupPC-users

Re: [BackupPC-users] Excluding folders from backup

2017-04-07 12:49:58
Subject: Re: [BackupPC-users] Excluding folders from backup
From: Holger Parplies <wbppc AT parplies DOT de>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 7 Apr 2017 18:49:23 +0200
Hi,

Bowie Bailey wrote on 2017-04-07 09:17:29 -0400 [Re: [BackupPC-users] Excluding 
folders from backup]:
> On 4/7/2017 2:55 AM, Sorin Srbu wrote:
> >> From: Markus Koeberl [mailto:markus.koeberl AT tugraz DOT at]
> >> On Friday 07 April 2017 07:29:30 Sorin Srbu wrote:
> >>> [...]
> >>> The field BackupFilesOnly is empty, as this would override anything in
> >>> BackupFilesExclude as per the documentation.

that is not true for rsync, only for smb (and possibly tar, though I don't  
think so). With rsync, you *can* use both BackupFilesOnly and 
BackupFilesExclude in combination.

> >> [...]
> >> It should look like this in your config file:
> >> $Conf{RsyncShareName} = [
> >>    '/home/sorin'
> >> ];
> >> $Conf{BackupFilesExclude} = {
> >>    '/home/sorin' => [
> >>      '/Videos',
> >>      '/ownCloud'
> >>    ]
> >> };
> > [...]
> > Doh! Now I get it! Thank you!
> > You first have to add a "root" and then the folders you want excluded.
> > Seeing it now, it's rather obvious.

It doesn't seem to be that intuitive ... this mistake has been made a lot.
Please note that, as Markus implied, the excludes need to be relative to the
share, i.e. "/Videos" and "/ownCloud" - whether you use the share name or "*"
as the key. An exclude of "/home/sorin/Videos" would match a file/directory
"/home/sorin/home/sorin/Videos" (which you likely don't have, so the exclude
would not have any effect).

> AND the "root" must either match one of your share names or * to match 
> all of your shares.

Almost. In fact, an exclude for "*" is applied to all shares *which don't
have a specific exclude*. So, if you used, for example,

$Conf {BackupFilesExclude} = {
    '/home/sorin' => [
        '/Videos'
    ],
    '*' => [
        '/ownCloud'
    ]
};

/home/sorin/Videos would be excluded, but /home/sorin/ownCloud would *not*!

Regards,
Holger

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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/