Took me a while before I got on the ball and starting doing this for syncing my web servers docs to my local machine (for backing up). I had previously used Interarchy for this, but I really prefer to use the command line, where I can schedule it via a cron (should all be 1 line).

rsync -ave ssh username@yourserver.com:/path/to/your/stuff/ /localpath/to/your/stuff/

You can put the local path first – it’ll push files up to the server instead.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
 

One Response to Rsync over SSH

  1. Sunny says:

    Easy way to remember the arguments is to use following command:

    rsync -have ssh username@yourserver.com:/path/to/your/stuff/ /localpath/to/your/stuff/

    also, you can do –progress if you like to watch the progress but shouldn’t use it in automated/scheduled scripts. other good argument is -z which does compression before moving it over internet, which is very useful if you are doing html/php or any other good compressable formats.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>