Rsync creates a directory with the same name inside of destination directory

If you don’t want another tests directory created, the correct command would be

rsync -avzp --del -e "ssh -p myport" user@hostname:/var/www/tests/ /var/www/tests

Note the / at the end of user@hostname:/var/www/tests/.

Leave a Comment