rix
rix

Reputation: 10632

Rsync, incremental file list output but no actual copying

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

Answers (2)

glglgl
glglgl

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

Can Kavaklıoğlu
Can Kavaklıoğlu

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

Related Questions