Hi. I'm having a problem with rsync not deleting subdirectories that
exist at the destination but which have been removed/renamed on the
source. I'm running 64-bit Arch, rsync 3.0.7, and am trying to back up
/home to an external USB drive. Both drives are JFS. Example, where
/media/8c4d270d-6139-4fed-8a32-2df8d28acdf3/ is the mount point for
the external drive on which a back-up already exists:

m...@robots mike]$ pwd
/media/8c4d270d-6139-4fed-8a32-2df8d28acdf3/mike
[m...@robots mike]$ mkdir deleteme1
[m...@robots mike]$ cd deleteme1/
[m...@robots deleteme1]$ touch deleteme1.txt
[m...@robots deleteme1]$ cd ../Desktop
[m...@robots Desktop]$ mkdir deleteme2
[m...@robots Desktop]$ cd deleteme2/
[m...@robots deleteme2]$ touch deleteme2.txt
[m...@robots deleteme2]$ rsync -avn --delete /home/mike/
/media/8c4d270d-6139-4fed-8a32-2df8d28acdf3/mike | grep deletem
deleting deleteme1/deleteme1.txt
deleting deleteme1/
[m...@robots deleteme2]$

What I would expect is for deleteme1 and 2 to both be deleted, but
rsync is not deleting directories outside of the top level of the
backup. For example, if I specify only the desktop, the second
directory I created above is deleted:

[m...@robots deleteme2]$ cd ../
[m...@robots Desktop]$ rsync -avn --delete /home/mike/Desktop/
/media/8c4d270d-6139-4fed-8a32-2df8d28acdf3/mike/Desktop | grep
deletem
deleting deleteme2/deleteme2.txt
deleting deleteme2/

I've also tried with --force and various forms of --delete
(--delete-after and so on). Before posting here I rtfm'd and confirmed
(hopefully) that my usage is correct. So, I apologize if I'm just
doing something wrong (but I'd appreciate being corrected).
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to