DIY Backup using an old computer and Amazon S3

I wanted to write a quick post on how I backup my files using an old computer an external hard drive and an Amazon S3 account. It was pretty easy to set up and has saved me a lot of time and worry about my files. This is going to be a quick overview, but if you have questions about specifics please ask in the comments.

I wanted a networked hard drive with a lot of space and I wanted it to be a RAID hard drive, however I didn’t want to pay a thousand dollars for a network drive so I got an old Dell Optiplex from work and a LaCie 4TB 2big Quadra 2-Disk RAID Hard Drive. The Dell was free and the 4TB drive was about $500 and was a birthday gift (yeah, I asked for a hard drive for my birthday). I installed Ubuntu onto the Dell. You don’t need a fast computer, any old computer will work. I installed Ubuntu on the Dell and s3cmd to backup my files to my Amazon S3 account. There are some more configurations I made to the Ubuntu box, but I’m not going to list them all here (unless you ask). I plugged the LaCie drive into the Ubuntu box and formatted it to ext 3.

On my mac laptop I wrote this script:

#!/bin/bash
wakeonlan xx:xx:xx:xx:xx:xx
rsync -rztO --exclude=".DS_Store" Documents/ steve@192.168.0.4:/media/backup1/backupDocuments
rsync -rvztO --exclude=".svn" Sites/ steve@192.168.0.4:/media/backup1/backupSites
rsync -rvztO --exclude=".DS_Store" Pictures/ steve@192.168.0.4:/media/backup1/backupPictures
rsync -rvztO --exclude=".DS_Store" Music/ steve@192.168.0.4:/media/backup1/backupMusic
ssh steve@192.168.0.4'sh s3-backup.sh'
exit

wakeonlan – xx:xx:xx:xx:xx:xx is the mac address. This starts up the old Dell (boots it up not wake it up from sleep).
rsync – Copies the files from my laptop to the Lacie Drive over the local network.
ssh – Logs into the Ubuntu box and runs an Amazon S3 script on that machine.

Amazon S3 script to run.

#!/bin/bash
s3cmd sync -r /media/backup1/backupPictures/ s3://mybackup.com/Pictures/
s3cmd sync -r /media/backup1/backupSites/DEV/ s3://mybackup.com/Sites/
s3cmd sync -r /media/backup1/backupSites/m21m-wpmu.com/wp-content/themes/ s3://mybackup.com/Themes/
s3cmd sync -r /media/backup1/backupDocuments/ s3://mybackup.com/Documents/
sudo halt

What this script does is uses s3cmd to copy the files from the Lacie Drive to my Amazon S3 account. And when it’s done it shuts down the Ubuntu box.

So a couple times I week I type this into the terminal:

~ sh runscipt.sh

All my file are backed up onto a my Lacie RAID over my local network and they are also backed up onto my Amazon S3 account. The first time I ran it it took awhile to upload all the files, now it takes a few minutes to backup all my files and I don’t have to carry around a pocket drive or thumb drive or anything. I just run the script in the background while I’m working.

IKEA drawer unit with computer and hard drive and router
Old computer and hard drive
Router and computer and hard drive

September 6th, 2010 | Categories: Workflow |

Leave a Comment


Make sure you enter the *required information where indicated.








Awesome! Let me know when it’s done so I can check it out.

Comment by admin — January 26, 2011 @ 2:17 pm

Oh, i’m sorry for the delayed reply.

Currently it is Windows only, probably we will release Mac version in the future, but definitely not in the near future.

Comment by TntDrive — January 25, 2011 @ 10:35 pm

That’s awesome. I looked around for something like this on the Mac, but it doesn’t look like there’s anything good out there. Maybe TntDrive will make something for the Mac?

Comment by admin — September 20, 2010 @ 5:11 pm

Under Windows you can create unlimited network drive by using TntDrive – http://tntdrive.com – it allows you to mount amazon s3 bucket as a network drive. it can be accessed by other machines over local network.

Comment by S3 Drive — September 19, 2010 @ 9:51 am