Random Linux Garble.

Awesome Command Line S3 Backup Tool

So I was recently trying to solve my backup/sync problem that I was running into with a lot of these backup services. The main two that I was using were Jungledisk and Dropbox. Dropbox is great for documents, scripts, pdfs, etc that I wanted to have synced accross my machines. Jungledisk was not such a great sync tool, and configuring it was kind of a pain.

I want a simple backup of my home directory really, that I can sync with my work computer, laptop, and home pc. I found this little gem, , that provides a simple wrapper for rsync, with most of the important options. I was able to write a simple script that syncs my home directory, excluding a few folders, to Amazon S3 and back.

Here is the simple script that I used to back up my home directory, excluding Music and Video folders, which can be pretty huge. Keep in mind I have already installed the s3adm program on my machine which is currently running Fedora 15 alpha.

# Script to backup to amazon s3 with s3cmd  

directories=`find ~/ -maxdepth 1 -type d ( ! -iname ".*" ! -iname "Video"   
         ! -iname "Music" ) | awk -F / '{print $4}'`  

for directory in $directories   
    echo "Syncing the "$directory" folder to S3"   
    s3cmd sync -v ~/$directory/ s3://homepc_backups/$directory/  

Again, the tool can be found HERE