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
