I want to use rsync to backup some files over ssh which I have managed to get working fine using:
rsync --delete -avze ssh /home/malachi/www/site/ malachi@remote-host:~/backups/daily/sites/site/
How would I create the sites/site/ directory on the remote-host if it does not already exist?
Would it be best to put the below before running the above command?
ssh -l malachi remote-host mkdir -p ~/backups/daily/sites/site/
Or is there a better solution?