jay callicott

Check me out on twitter: http://twitter.com/drupalninja/

Saturday, October 25, 2008

Server Backups to Amazon s3

I was able to find this article recently: http://www.timlinden.com/blog/server/backup-mysql-amazon-s3/

and was quite pleased that it was so easy to create a job to backup server files to amazon s3. In ab an hour I was already backing up to s3. The way we do it is targeting the files that matter:

1. subversion repository
2. user files (such as drupal files directory - almost all our sites are drupal)
3. databases

Also targeting those 3 things really keeps things focused and keeps the backup sizes small. Now some servers have files all over the place. I think scripts/websites should all be in subversion. There shouldn't be anything that isn't in subversion and that keeps everything centralized even tho they may be scattered all over the server. In each project folder in the subversion repository you should have documentation as to where the file(s) are deployed. For many hosts like ourselvces we run all mysql databases so that is pretty simple. User submitted files can also lie in many different places. Thankfully since most of our sites run off of one drupal install we have a centralized place where we store those files.

The backup script does all 3 quite nicely. The only thing I have left to figure out is how to delete files that are older than a week. The s3 perl module is pretty easy to use, altho it means I have to dust off my perl skills. I was very pleased that it was so easy to install that module through the whm interface, neat stuff.

And so we have a remote backup system that we've been wanting for sometime. And Amazon s3 is incredibly stable, cheap and infinitly scalable -- now that's exciting.

One other thing, the "s3 Manager" tool is great for viewing files in your Amazon account and it's free.

0 comments:

Check me out on twitter: http://twitter.com/drupalninja/

About Me

Drupal expert/consultant, PHP/MySQL Ninja, and entrepreneur - Working for Drupal shop Mediacurrent.com. Consulting services available.