I'm so taken with my new SliceHost VPS that I've moved this blog over to it. For the first time in four years this blog is hosted on something other than Apache: Nginx. It's still on drupal but running under php5 for the first time (only needing this fix).
The DNS has only just propogated so this is my first posting on the new host. To me it feels snappier when navigating around, a definite improvement.
I've been moving all my sites over to the new host, I've decided to put all my eggs in one basket. Well, not quite, I've also signed up for a minimal rsync.net account, giving me just over 3g of backup space. It will cost me circa £2.50 a month but will be worth it for the peace of mind.
I've put all my sites and also my most important /etc directories (such as /etc/nginx) into a subversion repository. I found a great subversion tip for checking /etc into subversion in the subversion faq:
How can I do an in-place 'import' (i.e. add a tree to Subversion such that the original data becomes a working copy directly)?
Suppose, for example, that you wanted to put some of /etc under version control inside your repository:
-
svn mkdir file:///root/svn-repository/etc \ -m "Make a directory in the repository to correspond to /etc"
-
cd /etc
-
svn checkout file:///root/svn-repository/etc .
-
svn add apache samba alsa X11
-
svn commit -m "Initial version of my config files"
This takes advantage of a not-immediately-obvious feature of svn checkout: you can check out a directory from the repository directly into an existing directory. Here, we first make a new empty directory in the repository, and then check it out into /etc, transforming /etc into a working copy. Once that is done, you can use normal svn add commands to select files and subtrees to add to the repository.
There is an issue filed for enhancing svn import to be able to convert the imported tree to a working copy automatically; see issue 1328.
So all the juicy stuff is in subversion and then I rsync the subversion repository over to rsync.net for the backup (nb, don't rsync a live svn repository while anyone else is modifying it!). This will allow me to roll-back changes should need be (or more likely see what I've changed to break something) using the Slicehost subversion repositories.
If anything does go wrong with my Slicehost slice (not saying it will but it might), I can rent a new VPS or dedicated server and have my stuff back up and running in less than a day (DNS propgation to the new server would be the delaying factor). It's not perfect redundancy but I'm not shafted.
Probably a more likely scerario is my server gets pwned in which case I would remaster it.
The rsync copy between the Slicehost and rsync runs at 583850.15 bytes/sec. Pretty good.
Possible improvements:
-
Use Duplicity to backup the repositories, with a full+incremental scheme.
-
Put a web front end on the subversion repositories so I can browse them (although [subclipse|http://subclipse.tigris.org/) is working nicely).
UPDATE: I've noticed this article getting hits for people looking how to copy a subversion repository. The simple answer is to just copy the files: cp -rf, rsync -a, however you like copying things. If the repository is live (i.e people are using it) or it will be running on a different version of subversion then the answer is to use:
svnadmin dump path-to-repository > dump.dat
cp dump.dat {wherever}
cd {wherever}
svnadmin load path-to-new-repository < dump.dat