Backup MySQL Databases and Web Folders to Amazon S3
16 Apr 2015
This post will outline how to create and schedule backups to Amazon S3.
Add IAM User
As recommended by Amazon, create an IAM group, say S3Admin, and assign it with the S3 full access permission. Then, create an IAM user, say S3User, and add it to the S3Admin group. Download the user credentials keeping note of the access and secret keys.
Install Tools
Install the s3cmd package and run it with the –configure option. It is important to provide the access key, secret key, and encryption password when prompted. Verify the configuration and if it runs fine, save it.
sudo apt-get install s3cmd
s3cmd --configure
A warning pertaining to python-magic being missing may show up when running s3cmd. Resolve this by installing python-pip, which is the Python package manager, and the python-magic package.