BackupPC-users

Re: [BackupPC-users] Yet another filesystem thread

2011-07-03 20:20:44
Subject: Re: [BackupPC-users] Yet another filesystem thread
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Sun, 03 Jul 2011 20:18:07 -0400
Holger Parplies wrote at about 19:31:14 +0200 on Sunday, July 3, 2011:
 
 > While the comments in config.pl state
 > 
 > # This can be set to a string, an array of strings, or, in the case
 > # of multiple shares, a hash of strings or arrays.
 > 
 > that is actually incorrect. A hash of strings makes no sense. In fact, Perl
 > would turn your example into a hash with "/proc" and "/pub" as keys and
 > "/blaat" and "/tmp" as respective values - certainly not what you want.
 > Turn your config value into an array (use '[]' instead of '{}'), and you
 > should be fine. You'll notice that the examples correctly don't include a
 > hash of strings.
 > 

I think by hash of strings, the following is meant:
$Conf {BackupFilesExclude} = { 'share1' => 'exclude-path1',
                               'share2' => 'exclude-path2',
                                ...
                             }

This is just a simpler case of the hash of arrays that you illustrate
below. While I have not tried that syntax, I imagine that is what the
documentation refers to. Of course, the wording is not terribly clear
except maybe to those who already know what is going on (and
understand perl)...


 > Better yet, use a full hash of arrays. That is easier to read and maintain,
 > because it's explicit on which shares you want which excludes to apply to:
 > 
 > $Conf {BackupFilesExclude} = { '/' => [ '/proc', '/blaat', '/pub', '/tmp' ] 
 > };
 > 
 > The leading '/' on your excludes is just fine, contrary to what has been 
 > said.
 > It anchors them to the "transfer root". Without the slashes, you would also 
 > be
 > excluding e.g. "/home/user/pub" and "/home/user/tmp", just as two examples of
 > things you might *not* want to exclude (well, you might even want to exclude
 > "/home/user/tmp", but really *any* file or directory named "tmp"? It's your
 > decision, you can do whatever you want, even things like "tmp/" (only
 > directories) or "/home/**/tmp/" (only directories somewhere under "/home") or
 > "/home/*/tmp/" (only directories immediately in some user's home directory).
 > See the rsync man page for details). Just note that if your share name is
 > *not* "/", you'll need to remove that part from the excludes (e.g. for a 
 > share
 > name "/var", to exclude /var/tmp you'll need to specify "/tmp" as the 
 > exclude,
 > not "/var/tmp", which would try to exclude /var/var/tmp).
 > 

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
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/