Trailing Slash Inconsistencies

Mark J de Jong dejongm at secdog.com
Wed Nov 27 15:17:37 EST 2002


Hello, 
I am noticing inconsistencies when using a trailing slash on the source
directories in conjunction with the '--delete' option. In one instance
when using a trailing slash files get deleted from subdirectories in the
destination tree. In the other instance they don't. I am using rsync
2.5.5. The following are the scenarios:

Scenario 1
----------
*nix(src) ---> *nix(dest)

rsync -va --stats --timeout=1800 --exclude-from=exclude.list --delete -R
-e ssh user at 192.168.0.10:/home/ /home/backup1/hostname/stage/

In this instance files in destination /home/backup1/hostname/stage/DIR
would get deleted.


Scenario 2
----------
windows(src) --ssh tunnel--> *nix(dest)

The windows machine is running rsync in daemon mode. I create a ssh
tunnel from the unix machine to the windows machine and port forward
from a random port and then run the following command:

rsync -va --stats --timeout=1800 --exclude-from=exclude.list --delete
--port=11111 -R user at 127.0.0.1::/home/ /home/backup1/hostname/stage/

In essence it's the same as the last command except in this case files
in the destination /home/backup1/hostname/stage/DIR do not get deleted.
When I remove the the trailing slash from the source directory (/home)
everything works fine.

Is this by design or might this be a bug?

Thanks,





More information about the rsync mailing list