Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

How to rsync your site

My web host only supports secure connections, so I can't use ftp publish.  I have dial-up, the site is large and there are many images, so scp is too slow.  I use rsync.

I downloaded cwrsync from here:

I created a keypair with:
ssh-keygen -t rsa

I copied the public key to my account on the webserver and put it in ~/.ssh/authorized_keys

I connected with ssh once to add the host to the list of known hosts.

Then I created a 3-line batch file like this:
@echo off
CD "C:\Program Files\cwrsync"
rsync.exe --progress --recursive /cygdrive/c/DOCUME~1/Owner/MYDOCU~1/WEBSIT~1/*

Jeremy Stein
Wednesday, October 6, 2004

I have used rsync in the past.  It is a good solution when your hosting provider requires ssh. 

The great thing about rsync is that it transfers only the portions of the files that have changed--not the entire files--which is great for use over a dialup connection.

Rsync can be a bit tricky to set up on a Windows client and usually requires your ISP to have it running on the server (UNIX-like).

David Burch
Wednesday, October 6, 2004

BTW:  Make very certain you understand what the switches like --recursive do.  It is all too easy to wipe out files on BOTH sides of the connection.

David Burch
Wednesday, October 6, 2004

*  Recent Topics

*  Fog Creek Home