Timeline for rsync with delete option, but preserve what's deleted
Current License: CC BY-SA 3.0
        6 events
    
    | when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 25, 2022 at 22:53 | comment | added | Noah May | It would be worth noting that the --backup-dir path is with respect to the destination folder and not the current directory. | |
| Dec 1, 2019 at 17:54 | comment | added | user258532 | --backup-dir with a specified backup directory will preserve deleted files in the backup directory. The manual says --backup-dir implies the -b option, so -b doesn't need to be present. I'm using rsync 3.1.3. | |
| Nov 13, 2017 at 13:15 | vote | accept | john-jones | ||
| Nov 13, 2017 at 13:09 | comment | added | Michael Kohne | 
        
            
    I don't see the -b option in there. --backup-dir is used to modify the behavior of -b, it doesn't turn -b on by itself.  Try -abz.
        
     | 
|
| Nov 13, 2017 at 13:00 | comment | added | john-jones | I am trying to get this to work. For some reason the deletion doesnt go into the rsync_garbage directory. Can you see whats wrong with it? rsync -az --backup-dir='/media/somefolder_a/rsync_garbage' --delete /home/username/a user@ip_address:/media/somefolder_a/ | |
| Nov 13, 2017 at 12:27 | history | answered | Michael Kohne | CC BY-SA 3.0 |