When I run this command
rsync -avzp --del -e "ssh -p myport" user@hostname:/var/www/tests /var/www/tests
files get synchronized but instead of saving files in /var/www/tests
, Rsync creates one more directory "tests" inside of existing "tests":
/var/www/tests/tests
and puts files there. How to tell Rsync not to create a new directory?
Best Answer
If you don't want another
tests
directory created, the correct command would beNote the
/
at the end ofuser@hostname:/var/www/tests/
.