DO NOT REPLY [Bug 4786] New: deletes files in parent directory when destination directory doesn't exist

samba-bugs at samba.org samba-bugs at samba.org
Sat Jul 14 00:05:41 GMT 2007


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 at samba.org
        ReportedBy: ms419 at freezone.co.uk
         QAContact: rsync-qa at 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 at 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 at 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.


More information about the rsync mailing list