samba-bugs@samba.org
2007-Jul-14  00:05 UTC
DO NOT REPLY [Bug 4786] New: deletes files in parent directory when destination directory doesn't exist
https://bugzilla.samba.org/show_bug.cgi?id=4786
           Summary: deletes files in parent directory when destination
                    directory doesn't exist
           Product: rsync
           Version: 2.6.9
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned@samba.org
        ReportedBy: ms419@freezone.co.uk
         QAContact: rsync-qa@samba.org
I'm using the PHP Symfony framework's rsync application publication
feature to
publish an application from my development box to a ~archives/symfony directory
on our production box. This invokes the following rsync command:
rsync --progress --dry-run -azC --force --delete
--exclude-from=config/rsync_exclude.txt -e ssh ./
archives@archivesofdevelopment.org:symfony/
I notice that when the ~archives/symfony directory doesn't already exist on
the
production box, rsync will delete all files and directories in the parent
directory (in our case ~archives). Once I create the ~archives/symfony
directory, rsync correctly copies ./* from the development box to
~archives/symfony, without touching anything else in ~archives on the
production box.
I've been over the man page, especially the parts about a trailing slash on
the
source, and I believe this behavior is a bug. For instance, rsync's syntax
is
supposed to be somewhat analogous to rcp/scp where "scp -r .
archives@archivesofdevelopment.org:symfony" would copy the working
directory to
~archives/symfony, without touching anything else in ~archives.
Also, the local analogy:
rsync --progress --dry-run -azC --force --delete
--exclude-from=config/rsync_exclude.txt -e ssh ./ /tmp/symfony/
copies the working directory to /tmp/symfony, without touching anything else in
/tmp.
The local version of rsync is: rsync  version 2.6.9  protocol version 29
The remote version is: rsync  version 2.6.3  protocol version 28
Thanks, Jack
-- 
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.
samba-bugs@samba.org
2007-Jul-14  04:29 UTC
DO NOT REPLY [Bug 4786] deletes files in parent directory when destination directory doesn't exist
https://bugzilla.samba.org/show_bug.cgi?id=4786
wayned@samba.org changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
            Version|2.6.9                       |3.0.0
------- Comment #1 from wayned@samba.org  2007-07-13 23:29 CST -------
There was a bug in 2.6.3 where --dry-run could output extra files that
weren't
going to be removed during the real run.  This was fixed in 2.6.4.  The CVS
version had a reprise of this bug, which I have just fixed.
Please be clear that when you said "rsync will delete all files and
directories
in the parent directory" you really meant to say that it will incorrectly
report that all those items would be removed if --dry-run was not present. 
Rsync would not have actually removed any extraneous files with the same
command without --dry-run.
-- 
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.