A simple Ruby script for backing up files to Amazon S3
After reading about the troubles Jeff Atwood had with his host going down, I figured it was time I get a real backup process in place for my own data. Since my hosting is self-managed (at Slicehost) without any sort of attached official backup plan, I'm definitely vulnerable to any sort of server failure. I've had a near miss a couple of times with personal computers—which I now back up often—but I've yet to set up anything recurring for my hosted files.
So, I took some time over the weekend and wrote a simple backup script with Ruby that saves the archive files to Amazon S3. A while back I tried something similar using rsync, but at the time I stumbled on setting the SSH keys and all that up. Since I'm now using S3 to host images for The Tools Artists Use, adding another “bucket” to store some backups was a no-brainer.
The script works for me, and since it may be useful for others, I've put the code up on my Github account: simple-s3-backup.