I have already mentioned my backup system for my local data using time machine and git but today I want to talk how to make bulletproof backup solution using S3 amazon servers.
You might wander why would someone need external server when there is time machine. The answer is simple, not everyone has a time machine, your external HD could fail or someone could even break into your house and take your laptop/pc and external HD as well.
Yeah I know, this is highly unlikely. But wait a second you will like this one. How would you like if all your databases would be backup, zipped and send to external server and you could be notified by email. It wouldn’t be free but it would be very very cheap. Really cheap.
So let me introduce the amazon S3 services. It is a cloud storage place place where you only pay for data you transfer. I am only talking couple of p’s for giga. So what do you need? You need s3 account which comes with secure ssh keys and you also need external party script which runs on your server. The script does the magic. I use python script which can be found in here. I set up cron job which executes this script once a day.
It works just great. Let me go back to the first case when I was talking about backup of all your machine to s3 as well. I use Jungle disk. It is a software which allows you to sync ant specified folders. I set it up so it happens again once a day.
So lets summarize. All your code with history sits on git and all your other data on s3. You are well protected and you can now sleep even better.
I am not giving you here any real code you could just copy and use but rather giving you idea how you could solve particular problem. I am planing to release site which will store code snipets such as jQuery plugins, WordPress plugins I have made in the past and also usufull configurations for serverices like S3 or EC2, some CSS tricks, Rails configurations and so on… I will be posting full scripts I use for S3 backup on the new code site. It should be here in a month time so fingers cross.
For those of you who prefer design to code I have created design gallery where I will be posting images of amazing products. None of them will be websites but they will be good source of inspiration for your web related design work. This site is already up I just need to do few fixes and I will share the url with you.