mysql backup on S3
I setup this script: automysqlbackup to backup my mysql databases on a daily basis. The script has pretty good instructions, just key in the details, add it to your cron and you are all set.
I sync up the backups with my S3 buckets using s3sync, go through the readme for details. In short you need to follow these steps:
- update the s3config.yml file, add your access key and secret key
- link the config file it to the etc folder
ln -s /path/to/s3sync/s3config.yml /etc/s3conf/s3config.yml - add the following command to the POSTBACKUP variable in automysqlbackup.sh script
/path/to/s3sync/s3sync.rb -r /path/to/backups/ bucket-name:s3-folder-name
You will need to manually remove the old backups from your S3 account. An alternative is to update the bucket directly using s3cmd instead of storing your backups on EBS / EC2 instance
