Backup files in EC2 Instance to Amazon S3


Alchemy

EC2 Instance : Ubuntu Server 12.04 LTS
Tool : s3cmd

Install s3cmd:

Configure s3cmd for managing data on S3:
Get the access key, secret key from your AWS account prior to this step.

Listing buckets:

Create a bucket:

Upload files to S3:

Synchronize files:

Download files from a bucket:

Delete files in a bucket:

Remove a bucket:

Write a shell script to synchronize files in the EC2 Instance:
backup_sync_ec2_s3.sh

Edit crontab file:

Schedule script:
Add cronjob to trigger automated backup everyday at 23:59 hrs

View original post