Douglas Jarquin

Backup your Mac to S3 in 5 minutes

2008 August 31st
1 Comments

There are many tutorials out there on how to back up your Mac to Amazon S3, but over time this process has been simplified.

Requisites

Before we get started we will need a few things. Also, make sure you have your Amazon S3 access identifiers at hand. You can get those from your AWS account.

  • Amazon S3 account
  • Mac OS X Leopard
  • Terminal Skills

Back it up

In order to keep this under five minutes I am simply going to list the steps required and not going to really go into any major detail. If you have any questions feel free to leave a comment.

1

Install the S3Sync Ruby Gem. Read more about Ruby Gems here.

sudo gem install s3sync

2

Add your Amazon access identifiers to the top of your .bash_login file.

export AWS_ACCESS_KEY_ID="XXXXXXXXXXXXXXXXXXXX"
export AWS_SECRET_ACCESS_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

3

Execute the command to backup where "my_backup_bucket" is the name of your bucket.

s3sync -v -r --progress --exclude=".svn" --exclude=".DS_Store" --exclude="Library/Caches" --delete ~/ my_backup_bucket:/

I personally do not like to schedule the backups with a cron because every time it runs I am doing something important. I suggest you create an alias for the command in your .bash_login file like this:

alias backup='s3sync -v -r --progress --exclude=".svn" --exclude=".DS_Store" --exclude="Library/Caches" --delete ~/ my_backup_bucket:/'

Then all you have to do is type "backup" whenever you want to run this command. Easy.

If the Terminal is not your kind of interface or your just want to backup a few folders of important files, I suggest you go with a full blown S3 file manager. Here are some of the applications I have used.

Applications

References

The most useful Ruby Gem

2008 April 29th
0 Comments

One of my favorite features of Ruby is Ruby Gems, the powerful package manager. There are tons of Ruby libraries available as gems such as Rails, Mongrel, and even one for Twitter. The gem I find the most useful nowadays is called cheat. Cheat basically puts tons of cheat sheets inside of your command line, so that you have quick access to the information you need without resorting to those hard to read man pages.

Install

sudo gem install cheat

Props

Cheat is made available by the guys over at Err free, the geniuses behind both FamSpam and GitHub.

Filed under Tips
Photostream
Foot ModelingHappy TimesOfficial Baby PictureEthan's First Yawn