[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rsync
Subject:    [Bug 1646] New: --inplace with --backup --backup-dir does not work
From:       samba-bugs () samba ! org
Date:       2004-08-22 23:55:48
Message-ID: 200408222355.i7MNtmen015396 () dp3 ! samba ! org
[Download RAW message or body]

https://bugzilla.samba.org/show_bug.cgi?id=1646

           Summary: --inplace with --backup --backup-dir does not work
           Product: rsync
           Version: 2.6.3
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned@samba.org
        ReportedBy: ard@waikato.ac.nz
         QAContact: rsync-qa@samba.org


Using --inplace with --backup and --backup-dir does not seem to work:

rsync -ax --backup --backup-dir previous destfile remotehost:/destdir/

...or more simply:

rsync -avx --stats --inplace --backup --backup-dir previous \
/etc/hosts /tmp/rsynctest/

strace watching the rsync running on the destination:

[...]
write(1, "160134 octets, for a total of 19296646"..., 160134) = 160134
ftruncate64(0x1, 0x1267186, 0, 0, 0x1) = 0
close(1)                    = 0
lstat64(0xbfffebac, 0xbfffba5c) = 0
lstat64(0xbfffa9bc, 0xbfffb9cc) = 0
rename("destfile", "previous/destfile") = 0
lstat64(0x8080780, 0xbfffb9cc) = 0
lstat64(0xbfffebac, 0xbfffba7c) = -1 ENOENT (No such file or directory)
write(4, "i\0\0\10rsync: stat \"/destdir/destfile\" failed: No such file or
directory (2)\n", 109 <unfinished ...>
[...]

With --inplace and --backup, shouldn't rsync make the backup file *before*
starting the overwrite?  Then it could (quote) extract the full amount of
network reduction it might otherwise.

I've tried it on two boxes.  Slackware 8.0 (I'm ashamed to admit) glibc2.2, and
Slackware 9.1 glibc 2.3, both kernel 2.6.4, rsync-2.6.3pre1.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic