rsync --delete not working? 
If you issue an rsync command with the --delete option in it and you find it isn't removing non-existent source files from the target, when you google you will find a whole host of answers that say "don't use a wildcard character * on the end of the target path!"

that's all well and good until you aren't using wildcards and --delete still isn't working!

what you do need on the end of the target path is a trailing slash / character for --delete to work!

so:

rsync -avzh --progress --delete -e 'ssh -p 31337 -i /home/user/keyfile.private' user@host.net:/home/user/backups /home/localuser/backups

will NOT do the --delete for you!

rsync -avzh --progress --delete -e 'ssh -p 31337 -i /home/user/keyfile.private' user@host.net:/home/user/backups/ /home/localuser/backups

WILL do the --delete for you!

[ view entry ] ( 343 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 458 )

<<First <Back | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Next> Last>>