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: mike at robots mike]$ pwd /media/8c4d270d-6139-4fed-8a32-2df8d28acdf3/mike [mike at robots mike]$ mkdir deleteme1 [mike at robots mike]$ cd deleteme1/ [mike at robots deleteme1]$ touch deleteme1.txt [mike at robots deleteme1]$ cd ../Desktop [mike at robots Desktop]$ mkdir deleteme2 [mike at robots Desktop]$ cd deleteme2/ [mike at robots deleteme2]$ touch deleteme2.txt [mike at robots deleteme2]$ rsync -avn --delete /home/mike/ /media/8c4d270d-6139-4fed-8a32-2df8d28acdf3/mike | grep deletem deleting deleteme1/deleteme1.txt deleting deleteme1/ [mike at 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: [mike at robots deleteme2]$ cd ../ [mike at 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).
On Fri, 2010-08-13 at 14:04 -0400, mike mitchell wrote:> 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: > > mike at robots mike]$ pwd > /media/8c4d270d-6139-4fed-8a32-2df8d28acdf3/mike > [mike at robots mike]$ mkdir deleteme1 > [mike at robots mike]$ cd deleteme1/ > [mike at robots deleteme1]$ touch deleteme1.txt > [mike at robots deleteme1]$ cd ../Desktop > [mike at robots Desktop]$ mkdir deleteme2 > [mike at robots Desktop]$ cd deleteme2/ > [mike at robots deleteme2]$ touch deleteme2.txt > [mike at robots deleteme2]$ rsync -avn --delete /home/mike/ > /media/8c4d270d-6139-4fed-8a32-2df8d28acdf3/mike | grep deletem > deleting deleteme1/deleteme1.txt > deleting deleteme1/ > [mike at 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.Strange. Can you reproduce the problem with a different source and destination? Try increasing the verbosity to -vvv, and search the output for a line saying "delete_in_dir(Desktop)" (indicating that rsync is considering files in that directory for deletion) as well as any mention of the deletem* files. -- Matt
Maybe Matching Threads
- [Bug 13991] New: rsync --delete --one-file-system skips deletes after crossing filesystems on destination.
- [Bug 1286] SFTP keeps reading input until it runs out of buffer space
- help needed using t.test with factors
- How to exclude directories from source with --relative
- unknown message 0:0 [sender]