Testing Environments rsync -avzie --delete --rsh="ssh -p 1234 -i /home/username/.ssh/user-rsync-key" rsync@example.com:/var/www/ /media/Files/Backups/rsync/www/ This will copy, and update files as expected, however will not delete the files on the local machine if they no longer exist on the remote. However, by moving the --delete to after the --rsh command, local files are deleted as expected... rsync -avzie --rsh="ssh -p 1234 -i /home/username/.ssh/user-rsync-key" --delete rsync@example.com:/var/www/ /media/Files/Backups/rsync/www/
The -e option is an alias for --rsh, so your first command says your remote-shell command is "--delete", and it is then changed by the repeated --rsh option. Drop the "e" from the "-avzie" list, and you'll be fine.