I often did this. Just ran a test, some tips.
- Record the entire @host user template
- Start ssh connection without rsync first, you may need to confirm your fingerprint first
- You donโt seem to pass the flag to protect extended attributes, this can cause files to crash on OS X. If you donโt need resource plugs, you are fine, but most of the time they need you.
My test case:
$ rsync -Pav ~/Desktop/ me@remote.example.com :~/rsyc-test
In this case, all the files in ~ / Desktop were copied to the remote host in my home directory. Since the rsyc-test directory did not exist, it was created for me. I had .app on my desktop, it did it, surprisingly, it works. Even some .webloc files did this and seemed to work, although I don't trust him.
I would strongly suggest adding -E to the flag
-E, --extended-attributes Apple specific option to copy extended attributes, resource forks, and ACLs. Requires at least Mac OS X 10.4 or suitably patched rsync.
I launched a new test, moved the Interarchy bookmark to my desktop, I know that this is a break if they are copied without a resource plug. Running without -E compared to -E, there is a difference of 152 bytes in xfered data. The first file on the remote computer did not work, the second transferred file worked.
I cannot but notice that in your example one of your paths is ~ / Dropbox, so all this may not matter, since the DropBox application does not support resource widgets at all, although I heard that there are plans for the future.
You also do not send the -delete flag if your final destination is a mirror of your data, you do not receive this if your final destination is backups that are constantly growing, preserving everything that has ever been in the source, the disadvantage of -delete is good .
Other notes:
You can exclude these stupid .DS_Store files --exclude '.DS_Store'
You can also set rsync to be a true mirror, so you wonโt need to run your other command, see the manual page for details.
My last working command to drag the desktop of my laptop to a remote computer is:
$ rsync -PEav --delete --exclude '.DS_Store' ~/Desktop/ me@remote.example.com :~/rsycn-test