1

Somehow I couldn't find a related question that quite fit me.

Anyway, I run a small blog. When I first started my blog it had next to no traffic, now it receives a couple hundred views per day though, hence my need for a new process. I have my website in a mercurial repository (on bitbucket). My previous method of updating it was to do something like

cd /srv/mywebsite
sudo svn update
sudo xbuild <release configuration options>

I feel that doing this is really not the best way. Also, previously I was using SVN, and for this next update, I've converted to Mercurial, so this won't quite work so easily.

What is probably the best way to update my simple website?

Things to keep in mind:

  • My website directory contains various non-versioned files such as images I've added as part of my blog content and such
  • My website runs on Arch Linux server and uses mod_mono+Apache+MongoDB (though database changes are quite rare)
  • There is at least one versioned file which varies between development and production. This contains database connection strings and other internal configuration
  • Downtime isn't a huge issue, but I really try to avoid more than 15 minutes per update

Surely someone out there has to manage a similar set up. What's the easiest way to do this? (preferably without having to "deploy" from my local machine and manually merge configuration files)

Earlz
  • 1,019
  • 5
  • 13
  • 29

1 Answers1

1

I've been running a automotive enthusiast website that's been getting 500-1000 page views for about 10 years now.

For most of that time, I've been running my updates via rsync. The core is Wordpress but the non-WP content is stored locally and rsync'd to the web host via rsync from my local machine.

Rsync is quite nice in that it allows you to exclude particular files such as your php.ini, mysql.cnf, and similar environment-specific configuration files from the command line.

For example, my slightly-obfuscated usage:

rsync -rlptP ~/lcl/* username@webhost:/home/username/www/

Note: I don't use the '-a' switch as that would include the user & group which are different between the sites.

Magellan
  • 4,451
  • 3
  • 30
  • 53