Question

looking to use rsync to transfer directory from remote to local recursivly with a dry-run. So far from rync man pages I settle on this:

rsync -rnvh user@server.com:/directory /local_directory/

and I get this

rsync error: remote command not found (code 127)

do I have to use this:

scp -rv user@server.com:/directory /local_directory/

(Which works perfectly fine for my one-time limited case) I'd rather get rsync running.

I've tried installing rsync on server without success. My access is quite limited on the remote server.

Was it helpful?

Solution

You don't need the -e ssh (unless you're using a really really ancient version of rsync) - ssh is the default.

For dry run:

rsync -avn user@server.com:/directory/ /local_directory/

For actual sync:

rsync -av user@server.com:/directory/ /local_directory/

Also note the trailing /s - otherwise you can end up with /local_directory/local_directory etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top