BackupPC-users

Re: [BackupPC-users] Excluding all files containing the word 'cache' regardless of their path....

2017-06-02 11:15:32
Subject: Re: [BackupPC-users] Excluding all files containing the word 'cache' regardless of their path....
From: Michael Stowe <mstowe AT chicago.us.mensa DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 02 Jun 2017 10:14:43 -0500

On 2017-06-02 05:41, Bob Katz wrote:

On Fri, 2017-06-02 at 00:10 -0500, Michael Stowe wrote:

No.

At best, this might exclude all SHARES that happen to have some variation of “cache” in the name, but I'm not even sure it would do that, depending on the xfer method.

What you're probably looking for is something along these lines:

$Conf{BackupFilesExclude} = {

‘*’ => [ ‘*cache*’ ]

};

I note that this will exclude all files containing the word cache as well as all files in all directories containing the word cache, which seems like a very poor idea, should somebody named “musicache” have a user directory or one tries to store their research files on cachexias.

Would backuppc be able to use any standard regex?

Here are is a cache file. Similar files would be great to exclude:

Cache0000020507.dat

In this case there is a folder that contains all these caches which I could exclude, but I think regex could help in difficult cases.

I'm fairly certain that BackupPC passes excludes through to the underlying transport, and I'm not aware of any that understand regexes, though pattern matching should do much of what you want, e.g.:

$Conf{BackupFilesExclude} = {

‘*’ => [ ‘*/cache*.dat’ ]

};

will exclude “cache…dat” files in any directory, which lessens the possibility of excluding something necessary.

As an alternative, while rsync doesn't understand regexes in excludes, it does understand regexes in filters, so it's possible to put together quite complex criteria for file selection, though it would naturally be outside of what BackupPC natively supports.

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

ADSM.ORG Privacy and Data Security by KimLaw, PLLC