I am using rsync over ssh and trying without success to sync files to a place inside user home directory.
All the time rsync seams to want to use full paths.
Tried things like:
rsync --rsh=ssh /src/ user@server:/dst
– obviously creates it in root if it canrsync --rsh=ssh /src/ user@server:~/dst
rsync --rsh=ssh /src/ user@server:~dst
– creades~dst
in root!
Best Answer
Dont try to use an absolute file path on the destination, the default is home.
Leave the path off to place it in home:
Or use a relative path to place it somewhere relative to home
Note you dont need
--rsh=ssh
either as its the default.EDIT:
If you wish to copy into the home directory of a user that isnt the one youre logging into the remote machine with, you need to escape the
~
with quotes or a backslash. For example