GithubHelp home page GithubHelp logo

ps6 / docker-mysql-backup-cron Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nickbreen/docker-mysql-backup-cron

0.0 1.0 0.0 17 KB

License: GNU General Public License v2.0

Dockerfile 21.48% Shell 78.52%

docker-mysql-backup-cron's Introduction

This Image

A cron job runs every 8 hours. Override this by setting cron job spec's in the CRON_D_BACKUP environment variable.

It backups all databases, unless DBS is specified as a space separated list of DB's to backup, using mysqldump.
The file are gziped and uploaded to S3 via s3cmd.

The DB will be connected to as root and requires $MYSQL_ROOT_PASSWORD be set from the linked DB container.

You must specify an AWS access key and secret key as well as the S3 bucket and optionally the prefix to store the backups in.

You must specify the bucket (and prefix) with the s3: scheme and trailing slash; e.g. s3://some-bucket/ or s3://some-bucket/some-prefix/.

By default, the S3 region used is us-east-1. You can override it with the REGION environment variable. See the official amazon region names for more informations.

See docker-compose.yml for an example of configuration.

Usage

Use docker exec <container> /backup.sh to take an immediate backup.

Use docker exec <container> /restore.sh to list available backups to restore from. Then docker exec /restore.sh <filename of backup> to restore it.

docker-mysql-backup-cron's People

Contributors

clescot avatar nickbreen avatar

Watchers

 avatar

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.