Reputation: 10632
I'm running the following command, with the intention of recreating the contents of (sync) on the remote server.
sudo rsync -avrz /path/to/sync/ -e "ssh -i ../keys/my.pem [email protected]:/path/to/sync/"
However, when I run this I get a "sending incremental file list" output and a list of the files which should be copied. Nothing actually gets written to the remote server.
Any idea what I'm doing wrong? Thanks...
Upvotes: 2
Views: 10082
Reputation: 91017
@Can does it right, but there is another way to go which might as well be considered.
Create a section in /root/.ssh/config
containing the following:
Host mybackuptarget # or whatever you prefer
User user
Hostname xx.xx.xx.xx
IdentityFile /path/to/keys/my.pem
and execute
sudo rsync -avrz /path/to/sync/ mybackuptarget:/path/to/sync/
.
Upvotes: 1
Reputation: 507
Try this
sudo rsync -avrz /path/to/sync/ -e "ssh -i ../keys/my.pem" [email protected]:/path/to/sync/
Note the place of the second " character. There is no remote address specified in the previous command.
Upvotes: 6