SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Strange behavior when enabling link_dest and sync_first
Author Message
Post Strange behavior when enabling link_dest and sync_first 
Hello,

I have enabled both options link_dest and sync_first in rsnapshot.conf,
and rsnapshot does not behave like expected.

For the first host, the 'rsnapshot sync' command sends the --link-dest
option to rsync, but it does not any more for the following hosts.
Indeed, there is a small piece of code which prevents it to do so when
the $snapshot_root/.sync directory already exists.
After commenting out this code (see patch below), rsnapshot works
exactly like I expected, and the backup is much faster than with 'cp -al'.

Is this a bug in rsnapshot, or have I misunderstood something?

Version is 1.3.0 on Debian Lenny.


--- rsnapshot.~1~ 2008-01-30 20:13:48.000000000 +0100
+++ rsnapshot 2010-01-20 18:42:47.000000000 +0100
< at > < at > -3270,17 +3270,17 < at > < at >
if ( -d
"$config_vars{'snapshot_root'}/$interval_link_dest.$interval_num_link_dest/$$bp_ref{'dest'}"
) {

# we don't use link_dest if we already synced once to
this directory
- if ($sync_dir_was_present) {
+# if ($sync_dir_was_present) {

# skip --link-dest, this is the second time the
sync has been run, because the .sync directory already exists

# default: push link_dest arguments onto cmd stack
- } else {
+# } else {
push(
< at > rsync_long_args_stack,

"--link-dest=$config_vars{'snapshot_root'}/$interval_link_dest.$interval_num_link_dest/$$bp_ref{'dest'}"
);
- }
+# }
}
}
}

--
Nicolas

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
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