Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /home/pbuc/public_html/forum/mods/ext_phorummail/ezc/Base/src/ezc_bootstrap.php on line 36

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KeyCAPTCHA_CLASS has a deprecated constructor in /home/pbuc/public_html/forum/mods/keycaptcha/keycaptcha.php on line 108
Inclusively adding excludes.
Welcome! » Log In » Create A New Profile

Inclusively adding excludes.

Posted by Anonymous 
Inclusively adding excludes.
January 06, 2015 12:02AM
I recently added a line like:    exclude nobackup
to rsnapshot.conf, because I was experimenting with storing an encryption key on a disk (*).  A few days later it occurred to me to double-check, and the nobackup directory was being backed up!

What I tracked it down to was that I was doing things like:

   exclude nobackup
   ...
   backup rsnapshot < at > hostname:/home/ hostname/home exclude=.cache,exclude=.ccache,etc

The backup line&#39;s excludes replace the global excludes, which was not what I expected (I expected to exclude the union).  I consulted the man page and found an example about using "+rsync_long_args=--exclude=/var/spool/" to add per-backup excludes, which implies that this is a known issue.

I&#39;ve been reading around in the code, but I haven&#39;t found an obvious thing I&#39;m missing.  AFAICT you can&#39;t just + any old option successfully.  Currently I&#39;ve just duplicated the global excludes into each backup, which is obviously not the way to go in the long term.  AFAICT, if I use a global exclude_file (/etc/rsnapshot.excludes) with per-backup exclude= rules, everything works as I&#39;d like it to, so that&#39;s probably where I&#39;ll take things.

Does all that make sense?  Did I miss a trick which is going to horribly mutilate my backups?

-scott

(*) My external mirror, which I rotate off-site.  So I wanted to make it easy to use when on-site, but secure off-site.  Admittedly, having the encryption key stored in an encrypted disk is merely stupid, rather than fatal, just trying to be appropriately paranoid.
Inclusively adding excludes.
January 06, 2015 12:11AM
Hi,

On 6/01/2015 11:00 AM, Scott Hess wrote:
[quote]I recently added a line like:
exclude nobackup
to rsnapshot.conf, because I was experimenting with storing an
encryption key on a disk (*). A few days later it occurred to me to
double-check, and the nobackup directory was being backed up!
[/quote]
I use the rsync -F option (with other options), this allows me to use
.rsync-filter files at the top of each file system to exclude files
and/or directories.

Cheers
A.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Inclusively adding excludes.
January 06, 2015 10:38PM
On Mon, Jan 5, 2015 at 4:00 PM, Scott Hess <scott < at > doubleu.com ([email]scott < at > doubleu.com[/email])> wrote:
[quote]I&#39;ve been reading around in the code, but I haven&#39;t found an obvious thing I&#39;m missing.  AFAICT you can&#39;t just + any old option successfully.  Currently I&#39;ve just duplicated the global excludes into each backup, which is obviously not the way to go in the long term.  AFAICT, if I use a global exclude_file (/etc/rsnapshot.excludes) with per-backup exclude= rules, everything works as I&#39;d like it to, so that&#39;s probably where I&#39;ll take things.

[/quote]

Oops - I wasn&#39;t reading things correctly, using per-backup exclude= also drops global exclude_file.  Fortunately, using an exclude_file is easier to mix with per-backup settings, because I can use exclude=local,exclude=local,exclude_file=/etc/rsnapshot.exclude

-scott
Inclusively adding excludes.
January 06, 2015 10:40PM
On Mon, Jan 5, 2015 at 4:09 PM, Andrew McGlashan <andrew.mcglashan < at > affinityvision.com.au ([email]andrew.mcglashan < at > affinityvision.com.au[/email])> wrote:
[quote]On 6/01/2015 11:00 AM, Scott Hess wrote:
[quote]I recently added a line like:
     exclude nobackup
to rsnapshot.conf, because I was experimenting with storing an
encryption key on a disk (*).  A few days later it occurred to me to
double-check, and the nobackup directory was being backed up!
[/quote]
I use the rsync -F option (with other options), this allows me to use
.rsync-filter files at the top of each file system to exclude files
and/or directories.
[/quote]

Yeah, in reading I can see that there are probably interesting ways to handle this.  Those options turn my brain inside-out, though, so I&#39;ll have to spend time running it against little sample directories to verify things :-).

-scott
Sorry, only registered users may post in this forum.

Click here to login