Wednesday, August 8, 2007

Guide : Ubuntu and Backing up to Amazon S3

I have been looking for a good method to back up to Amazon's S3 service. I have used the 'S3 Firefox Organizer' although this seems a bit cumbersome at times and does not give much feedback.

I have since installed s3sync

you need to have ruby installed as well as openssl-ruby, so using aptget I installed these

sudo apt-get install ruby

sudo apt-get install libopenssl-ruby


Extract s3sync somewhere on your computer and then create a file in this directory called s3config.yml and put your key and secret key that you have obtained from Amazon in this file, there is an example file in the directory to help out here.

You will need to create a bucket (somewhere to save your files) on your AmazonS3 Service so browse to the newly extracted folder and run the commands below to list the buckets in your account and also create a bucket

s3cmd.rb listbuckets

s3cmd.rb createbucket BucketName


You can then backup to AmazonS3 service with a command such as

s3sync.rb -r directory bucketname:nameofbackup


There are some other useful commands which can be obtained in the readme files.

No comments: