On 5/5/05, Charles Pittman <[EMAIL PROTECTED]> wrote:
The following is a question I intended to post earlier, but decided to lookup my own answer (and happened to find it in the manpage): I have ssh access to my webhost. I am looking for an easy way to keep ~/public_html updated on the remote site using ssh.

I was using scp to transfer files, but I knew that there had to be an easier way. I searched the internet for a solution and didn't find a direct one, when I thought of rsync (1-way update). Anywho, I checked the rsync manpage and there was an interesting flag: -e

This particular flag allows you to pick the remote shell you wish to use (such as ssh). I created an alias using my new command and now it's easy to update my site.

For those interested, here is the command:
rsync -v -c -r -u -P -e"ssh -l<user>" --delete-excluded --stats /local/dir/ <remote_address>:/remote/dir/

See man rsync(1) for information about the flags used.

Hopefully this helps someone out there.

By default, rsync uses ssh.

Reply via email to