Earlier this week I lost my old trusty server which hosts www.samsaffron.com and www.mediabrowser.tv died.

I decided to migrate all the data to a new VPS (virtual private server), here is a sketchy account of how this all happened.

A few months ago I set up an automatic backup script on my debian server. It’s job was to send incremental backups, daily, to Amazon. This script ran a few mysql dump statements and a subversion dump statement. Once the data was copied locally, I used duplicity to backup the data incrementally to a local dir and then s3sync to copy all the data on to my amazon s3 slot.

Daily my trusty cron job would send me an email telling me that all is good and backups are working.

A few days ago everything just stopped working, these kind of things always tend to happen in the most inconvenient time. Turns out I have a dead power supply. Usually, this is not a really big deal, but my server is 6 years old and the power supply it had was a custom piece of hardware which probably can not be purchased anymore.

I was super lucky to have had a proper backup strategy. I decided its time to scrap the old server and move to something new. Because I had backups this was feasible.

So, all should be up and running again. Building the new server image gave me a great opportunity to clean up a bunch of stuff.

Lessons learned

  • If you are going to have your own server, you better have some sort of backup strategy that is reliable.

  • Backup more data than you think you need: it would have been handy to have my bind records in text format, instead of having to recreate them. My apache config would have been handy as well.

  • Test your backup system regularly. It takes time, but your server could get hacked or explode any day.

  • Incremental backups are really risky, I was lucky to have all the pieces but it too about half an hour to reconstruct my backup from the pieces out there. If you are going incremental, have a full backup slotted as well on a regular basis.

  • I think I prefer the VPS solution, since my data is now virtual I can download my server to my computer and play around with it. Snapshotting virtual images gives you a much simpler backup solution.


Ga22ar almost 9 years ago

good to hear it all went well, however.

I was reg to the bbs just before it abend'd. After your restore my account doesnt exist.. NP – I'll re-reg.. Have done so but havent rec'd a confirmation mail – and re-requesting one didnt produce either..

cheers !!

Sam Saffron almost 9 years ago
Sam Saffron

Yerp, I have that sorted now.

comments powered by Discourse