Thu, 16 Oct 2008

A Deployment Plan Emerges

Well, I can't tell you how many times I've broken and fixed my site on the server that hosts it. Ok, it was 5. Anyway, it was too many. So my new system is very high tech. It's called rsync. Yeah. Fifty year old technology. Very swish.

But it does the job.

So on my home machine, I use git, but then (after failing to figure out how to configure it with my hosting company), I decided that I could live with just rsync-ing it all over there. Since I explicitly didn't exclude the .git directory, and I don't do any development on the hosting machine itself (caveat: reCaptcha only works with a specific domain so it isn't trivial to make it work on my local machine), I get a nice offsite backup with full history.

So rsync: at first I thought that I could just rsync. you know:

rsync -z --rsh=/usr/bin/ssh -r --links --delete  public/ secret_id@ssh.xxx.nearlyfreespeech.net:/home/public

But it turns out, but since this would write new mtimes for the entries, all the entries flopped around in order.

The real fix was to switch to useing filenamemtime.py plugin, so that I could have whatever mtime I wanted, and the date would be embedded in the filename. But before I figured that out I discoverd that rsync supports preserving timestamps. The flag is --times.

But since that's a bit of a mouthful, I just made a shell script to do the syncing (along with one or two other minor details, like changing "192.168.10.02" to 'www.howtoprocrastinate.com' and so forth to accommodate slight differences between the environments).

At this point, I think: yay! I'm done.

So I get comments going, it's actually fairly straightforward, if you read the documentation, and ignore all the myriad ways to enhance it. At which point I disover/realize that since comments are made on the hosted machine, when I rsync, it deletes them. So I need to bring the comments down, git-add, git-commit them, and then rsync.

And that is the full and complete story of my deployment plan.

The end.

posted at: 00:32 | path: /Meta | comments/permalink

Name:


E-mail:


URL:


Comment: