GithubHelp home page GithubHelp logo

docker-mysqlbinlog-backup's Introduction

Stories in Ready

docker-mysqlbinlog-backup

Backup MySQL database using daily dump and incremental backup using mysqlbinlog.

Usage

Run mysqlbinlog-backup container with the following flags:

docker run \
  --rm \
  --volumes-from <mysql-container-name> \
  --name mysqlbinlog_backup \
  --env-file env.txt \
  -e "BACKUP_TYPE=hourly" \
  r2integration/mysqlbinlog-backup

Note: BACKUP_TYPE=hourly will fail if there are no current daily backup.

Available options:

  • "BACKUP_TYPE=daily" - create daily backup. Can only happened once a day.

Make sure to have env.txt

AWS_ACCESS_KEY_ID=<aws-access-key-id>
AWS_SECRET_ACCESS_KEY=<aws-secret-access-key>
AWS_DEFAULT_REGION=us-east-1
AWS_S3BUCKET_PATH=s3://<aws-bucket-name>

MYSQL_USER=root
MYSQL_PASSWORD=<mysql-password>
MYSQL_HOST=<mysql-host>
MYSQL_PORT=3306

CPU_LIMIT=50

Valid Amazon Web Service credentials and S3 bucket are required to upload compressed files to Amazon S3.

Assumptions

  • mysql binary logging is enabled
  • default mysql storage path: /var/lib/mysql
  • mariadb mysqldump and mysqlbinlog will work the same as actual mysql. Please let me know if this is a bad assumption.

TODO:

  • ability to use different mysql bin log file name
  • ability to use different path to mysql bin log
  • ability to create separate cron job for daily and hourly

docker-mysqlbinlog-backup's People

Contributors

rahimrahman avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-mysqlbinlog-backup's Issues

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.