Hans Korneder
2012-Dec-10 15:05 UTC
Problem/Bug when syncing subdirectory structures with delay-updates and partial-dir
Hello there, recently stumbled over a problem syncing subdirectory structures in combination with partial-dir. Files are saved within partial-dir, but without the subdirectory path they came from, so having the same file names within different subdirectories causes them to be overwritten (and/or lost, of course). Currently I'm using rsync 3.0.9 protocol version 30 in Linux (openSuSE-12.2). The setup: local machine: danae, remote machine: devsys # cleanup rm -rf srcdir ssh korn at devsys "rm -rf /jbod1/tmp/priv-temp-dir /jbod1/tmp/priv-part-dir /jbod1/tmp/destdir" # create source structure mkdir -p srcdir/sub1 srcdir/sub2 echo "file1" > srcdir/sub1/file1 echo "readme1" > srcdir/sub1/README echo "file2" > srcdir/sub2/file2 echo "readme2" > srcdir/sub2/README # rsync ssh korn at devsys "mkdir -p /jbod1/tmp/priv-temp-dir" rsync --partial --delay-updates --partial-dir=/jbod1/tmp/priv-part-dir --temp-dir=/jbod1/tmp/priv-temp-dir -a srcdir/ korn at devsys:/jbod1/tmp/destdir The message: rsync: rename failed for "/jbod1/tmp/destdir/sub2/README" (from /jbod1/tmp/priv-part-dir/README): No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9] The result: /jbod1/tmp/destdir/sub2/README is missing /jbod1/tmp/destdir/sub1/README has the contents of srcdir/sub1/README Any help appreciated! Regards, Hans
Wayne Davison
2012-Dec-24 19:45 UTC
Problem/Bug when syncing subdirectory structures with delay-updates and partial-dir
On Mon, Dec 10, 2012 at 7:05 AM, Hans Korneder <hans at korneder.de> wrote:> Files are saved within partial-dir, but without the subdirectory path they > came from, so having the same file names within different subdirectories > causes them to be overwritten (and/or lost, of course). >You should use a relative partial-dir (not an absolute path) for complex transfers so that each subdirectory gets its own partial dir. ..wayne.. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20121224/77e427ed/attachment.html>