Skip to content

A port of the popular http://sourceforge.net/projects/automysqlbackup/ script. This version dumps and compresses these dumps in a tmp folder and moves the compressed archives to Amazon S3.

License

Notifications You must be signed in to change notification settings

jimtyrro/Amazon-S3-MySQL-Backup-Script

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Amazon-S3-MySQL-Backup-Script

A port of the popular http://sourceforge.net/projects/automysqlbackup/ script. This version dumps and compresses these dumps in a tmp folder and moves the compressed archives to Amazon S3.

Configuration

###Step 1:

Make sure you have s3cmd installed and configured (http://s3tools.org/s3cmd). s3cmd is available as a package for all major Linux distro's.

$ sudo apt-get install s3cmd  # Ubuntu
$ yum install s3cmd # CentOS/RHEL:
$ zypper addrepo http://s3tools.org/repo/SLES_11/s3tools.repo ; zypper install s3cmd  # SUSE Linux Enterprise Server 11

After the installation you should run:

s3cmd --configure

More information here: http://s3tools.org/s3cmd-howto

###Step 2: Edit the automysqlbackup.s3 file and set the BACKUPDIR to an existing bucket (or create the mysql_backups bucket using: s3cmd mb s3://mysql_backups). On most Debian based hosts the USERNAME and PASSWORD variables are read from /etc/mysql/debian.cnf. On other distro's you should add a SELECT only account to MySQL use those credentials in the script.

###Step 3: Move the script to /etc/cron.daily so it is executed every night. Make sure to set the execute permissions.

About

A port of the popular http://sourceforge.net/projects/automysqlbackup/ script. This version dumps and compresses these dumps in a tmp folder and moves the compressed archives to Amazon S3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%