BackupPC-users

Re: [BackupPC-users] Excludes only at a specific directory depth? (with tar as XferMethod and BackupPC 3.3.0)

2015-09-10 07:54:17
Subject: Re: [BackupPC-users] Excludes only at a specific directory depth? (with tar as XferMethod and BackupPC 3.3.0)
From: Axel Beckert <beckert AT phys.ethz DOT ch>
To: backuppc-users AT lists.sourceforge DOT net
Date: Thu, 10 Sep 2015 13:52:41 +0200
Hi Wolfgang,

On Thu, Sep 10, 2015 at 08:09:30AM +0200, Wolfgang Karall wrote:
> Hi Axel,
> 
> On 15-09-09 17:57:58, Axel Beckert wrote:
> > $Conf{BackupFilesExclude} = {
> >   '/Users/*/' => [
> >       '/Pictures',
> >       '/Movies',
> >       '/Music',
> >   ],
> >   [...]
> > };
> 
> BackupFilesExclude only understands one special key, '*', for all shares
> not matched by any other key in the configuration.

Yep, that's how I read the comments in config.pl as well as the code
of BackupPC::Xfer::Tar.

> Maybe you can adapt the $Conf{TarClientCmd} to have the exclude list
> defined on the client, I use
> 
> $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
>                     . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+'
>                     . ' -X $shareName+/.backuppc.excludes'
>                     . ' --totals';
> 
> for some hosts where there's the need for client-side exclude lists,

That's an interesting idea. While reading the manual I noticed that
there are tons of ways to specific excludes based on files, but I
didn't have the idea to use them in $Conf{TarClientCmd}. Will think
about that and reread the according section of the GNU Tar manual
under that aspect.

> adding empty .backuppc.excludes files for shares without exclusions.

Would be even nicer if those files would be skipped if nonexistent,
but still a nice idea.

> PS: I guess the mention in the GNU tar manual about * being greedy even
> when encountering a / is "Periods (`.') or forward slashes (`/') are not
> considered special for wildcard matches."

Indeed. I seem to have missed that or just looked at the wrong
position inside the manual. Thanks!

                Kind regards, Axel Beckert
-- 
Axel Beckert <beckert AT phys.ethz DOT ch>       support: +41 44 633 26 68
IT Services Group, HPT H 6                  voice: +41 44 633 41 89
Departement of Physics, ETH Zurich
CH-8093 Zurich, Switzerland                http://nic.phys.ethz.ch/

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
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>