Rsync over SSH

September 11, 2006 – 4:34 pm

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
  1. One Response to “Rsync over SSH”

  2. 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.

    By Sunny on Sep 15, 2006

Post a Comment