For a long time I've been wishing to replace scp
in favor of rsync
due to all the advantages and extra features of the latter (better performance, resuming interrupted downloads, displaying progress etc).
However I'm still stuck with scp
: I'm too lazy to choose which options to use with rsync
. Every time I need a specific feature (e.g. resuming an interrupted download) it takes minutes to research how to do it. Add to it the fact that rsync
with no options has disadvantages over scp
(e.g. it's less secure, if you don't use --rsh=ssh
) and scp
is just the laziest choice.
I'd like to pick a set of options once and for all, set up a good rscp
alias and live happily ever after.
Can someone recommend a good set of options to use rsync
to copy files over ssh
?
--rsh=ssh
is the default forrsync
. 2. If you want all permissions and ownership to be preserved, you can usesudo -avn source/ target
. If you want to preserve hard links too, usesudo -Havn source/ target
; There may be problems with some ownership and permissions without sudo (or without running as root), but you may not be able to do that at the remote side of the connection (at the ssh server).