Cloud Backup

I have kept meticulous backups of every turn from the three games I run. Before and after each turn, the data file, orders file and summary are zipped up into a .tar.bz2 file. This is essential for fixing bugs weeks later, because it lets me re-run a turn with the old data and watch what went wrong in my debugger “as it happens”.

The problem with these backups is that they sit on the machine in Germany that hosts the game, and I tend to do my debugging at home. Also, storing the current game data and the backups on the same hard disk is hardly redundancy. A weekly rsync between my home machine and the server would solve this, but my home machine runs Windows for a number of reasons, and so that’s not really an option. I could rsync to another machine in the house (I have a few Raspberry Pi for similar purposes) but then I still have to move the files from there to my desktop PC when I actually want to debug something.

Today I finally solved that problem, with a free Box (previously box.net) account. Box supports webdav, so it’s as easy a single curl request to upload my file to a shared folder, and the Box app on Windows will sync it to my desktop. Backup and local debug copies solved!

For future reference: to store the eressea.db sqlite database in a Box folder named Eressea, this is the curl command to do the HTTP PUT request:

    curl -n

-T eressea.db

https://app.box.com/app/Eressea/eressea.db 

Authentication with Box is done through a .netrc file on the host, because I don’t want to check the account password into github along with my backup script. cat ~/.netrc:

    machine dav.box.com login box@eressea.de password swordfish

Standards are great, and WebDAV support really makes the decision for which cloud storage service I want to use an easy one. The free account gives me 10 GB storage, enough for approximately 460 turns at today’s size of the game, so if I move them to CD backup frequently enough, I should never have to pay for storage. Nice!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.