Rsync does not delete

Christian Völker chrischan at knebb.de
Sat Oct 20 18:40:00 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wayne Davison schrieb:
> On Sat, Oct 20, 2007 at 10:09:17AM +0200, chrischan at knebb.de wrote:
>> /usr/bin/rsync -azx --delete --numeric-ids --relative --delete-excluded --exclude=/srv/backup/* --rsh=/usr/bin/ssh root at mysql:/boot /srv/backup/daily.0/mysql_boot/
> 
> That will copy things into a /srv/backup/daily.0/mysql_boot/boot
> directory (note the trailing "boot").  Is that where you're looking for
> deletions to occur?  Or did you expect the transfer to copy into the
> .../mysql_boot dir?  If so, add a trailing slash to the source path.
> 
> ..wayne..

The copy itself works perfect.

For testing purpose I create a crontab job on the sender side which
creates one file named after the current day and deletes the old one.
These files are being copied in the right place. But the old ones don't
get deleted.

Does your mail mean the copy and deletion work differently regarding the
trailing slash?

AFAIK the trailing slash means where to start with copying the
destination files- but when they are in the right place on the
destination files, they should be deleted.

Greets from Ireland

Christian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHGkuA0XNIYlAXmzsRAiDaAKDOVlgHZQYvPNbzwTB8Xbx0QBe24gCgr4xZ
DksdM7dTh/wPZWxBpz52Sto=
=gNtY
-----END PGP SIGNATURE-----


More information about the rsync mailing list