SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Rsnapshot exclude to prevent backup of snapshots is too broa
Author Message
Post Rsnapshot exclude to prevent backup of snapshots is too broa 
On Thu, 2010-01-14 at 13:38 +1100, David Keegel wrote:
Please note the comments above that section of code :-
# dynamically generate an exclude path to avoid backing up the snapshot root.
# ... it's tempting to think that just using the snapshot_root as
# the exclude path will work, but it doesn't. instead, this an exclude path that
# starts relative to the backup point.

This patch appears to think that just using the snapshot_root as the
exclude path will work, which contradicts the comment.

Could someone expand on "but it doesn't" from the comment?

I tried a simple test with the following rsnapshot conf :-
config_versio 1.2
snapshot_root /tmp/tmp
cmd_rsync /usr/bin/rsync
cmd_ssh /usr/bin/ssh
interval daily 7
backup /tmp/ localhost/
and a modified rsnapshot (like you would get from the patch), which
had an rsync command like this:

/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
--exclude=/tmp/tmp /tmp /tmp/tmp/daily.0/localhost/

That did NOT create a /tmp/tmp/daily.0/localhost/tmp/tmp. So it seems
like it did work.

The rsync I used in this case was:
rsync version 2.6.8 protocol version 29

It doesn't work with rsync before 2.6.8 due to a bug:

http://lists.samba.org/archive/rsync/2006-March/014953.html
http://gitweb.samba.org/?p=rsync.git;a=commitdiff;h=c291d0575962774b449e405c95ae099af4dd7dc6

David, what do you want to do about this? I would be ready to drop
support for rsync older than 2.6.8 (released April 22, 2006), but I know
you have been reluctant to make such moves in the past.

--
Matt


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Rsnapshot exclude to prevent backup of snapshots is too broa 
On Sat, 2010-03-06 at 21:10 -0500, Matt McCutchen wrote:
On Thu, 2010-01-14 at 13:38 +1100, David Keegel wrote:
Please note the comments above that section of code :-
# dynamically generate an exclude path to avoid backing up the snapshot root.
# ... it's tempting to think that just using the snapshot_root as
# the exclude path will work, but it doesn't. instead, this an exclude path that
# starts relative to the backup point.

This patch appears to think that just using the snapshot_root as the
exclude path will work, which contradicts the comment.

Could someone expand on "but it doesn't" from the comment?

I tried a simple test with the following rsnapshot conf :-
config_versio 1.2
snapshot_root /tmp/tmp
cmd_rsync /usr/bin/rsync
cmd_ssh /usr/bin/ssh
interval daily 7
backup /tmp/ localhost/
and a modified rsnapshot (like you would get from the patch), which
had an rsync command like this:

/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
--exclude=/tmp/tmp /tmp /tmp/tmp/daily.0/localhost/

That did NOT create a /tmp/tmp/daily.0/localhost/tmp/tmp. So it seems
like it did work.

The rsync I used in this case was:
rsync version 2.6.8 protocol version 29

It doesn't work with rsync before 2.6.8 due to a bug:

http://lists.samba.org/archive/rsync/2006-March/014953.html
http://gitweb.samba.org/?p=rsync.git;a=commitdiff;h=c291d0575962774b449e405c95ae099af4dd7dc6

Actually, that bug is only in rsync 2.6.7; rsync 2.6.6 is not affected,
and I presume earlier versions aren't either. The comment was added in
rsnapshot-program.pl 1.216 (Sept. 3, 2004), long before 2.6.7, so I
don't know what it is referring to; I think we can safely ignore it.

--
Matt


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Rsnapshot exclude to prevent backup of snapshots is too broa 
Here is a proposed patch that changes the code to use an anchored
absolute-path exclude rule. This should work in any rsync since 2.6.4,
except for 2.6.7 due to the bug I mentioned.

--
Matt

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB