Rsync --delete does not work
Granzow, Doug (NCI)
granzowd at mail.nih.gov
Tue Jul 23 12:35:01 EST 2002
Try adding -v to your rsync command to get more verbose output, perhaps
giving you an idea why --delete is not working as expected. --delete works
for me, but there are situations where rsync will ignore --delete for safety
(such as if certain errors occur).
Also, remember that "*" is expanded by your shell, before rsync sees the
command line. So if your /data/transfer contained files "a", "b", "c", and
"d", and you deleted "c", rsync would see your command line as:
rsync -a --delete a b d /data/exp_dir
In other words, you've told rsync not to sync "c", so it would have no
reason to delete it at the destination directory. Try using "." instead of
"*" to get more reliable results.
From: g dm [mailto:gdm2002 at email.com]
Sent: Tuesday, July 23, 2002 11:55 AM
To: rsync at lists.samba.org
Subject: Rsync --delete does not work
I just started to use rsync & samba to backup some windows NT & 98 shared
directories to a linux machine
linux: debian 2.2.4
I first mount the windows directory on the linux and then do a
---command on linux
mount -t smbfs -o username=user,password=passwd //ntserver/exp_dir
rsync -a --delete * /data/exp_dir
this works fine, except for deleted files. Files that got deleted on the
windows remain on the linux side, even after repeated rsync's
This is what the --delete option is supposed to do.
I've tested this several times. the samba mount show the correct state,
i.e. without the deleted files. Rsync does not notice they're gone.
I've seen/read a lot of posts in the google archives concerning this
option. Most of them came from this mailing list. They all seem to suggest
it really should work.
So, what did I do wrong?
Sign-up for your own FREE Personalized E-mail at Mail.com
Save up to $160 by signing up for NetZero Platinum Internet service.
To unsubscribe or change options:
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
More information about the rsync