More tips on using rsync to deploy your website

My post on deploying a website using rsync has gotten quite a few hits.

I thought I'd add some more tips:

./deploy.sh n

The n will get substituted for $1.

Troubleshooting

I've found a lot of times rsync appears to be copying the same files over and over.

There are a few things you can do to troubleshoot when rsync recopies the same files.

The options that I've found come in real handy are:

  1. The i option, which shows you why a file is being copied (all pluses means rsync thinks it doesn't exist in the destination; t means the times differ; s means the contents differ (?)).
  2. The --modify-window=1 option. This lets you ignore differences in modified timestamps. You can set 1 to a high number to ignore large differences.


Posted 03/03/2010
blog comments powered by Disqus