Git Product home page Git Product logo

amazon-s3-mysql-backup-script's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.