项目作者: SierraSoftworks

项目描述 :
A MySQL backup container which ships the backup to S3
高级语言: Dockerfile
项目地址: git://github.com/SierraSoftworks/minback-mysql.git
创建时间: 2018-04-24T18:47:19Z
项目社区:https://github.com/SierraSoftworks/minback-mysql

开源协议:

下载


minback-mysql

Minio Backup container for MySQL

This container provides a trivially simple means to run mysqldump and fire the results off
to a Minio instance. It is intended to be run in conjunction with a Kubernetes CronJob
to maintain a frequent backup of your critical data with minimal fuss.

Features

  • Dumps a single MySQL database to an S3 bucket
  • Lightweight and short lived
  • Simple and readable implementation

Example

  1. docker run --rm --env-file backup.env minback/mysql my_db -h mysqlserver1

backup.env

  1. MINIO_SERVER=https://play.minio.io/
  2. MINIO_ACCESS_KEY=minio
  3. MINIO_SECRET_KEY=miniosecret
  4. MINIO_BUCKET=backups

Usage

  1. DB_NAME [OPTIONS...]
  2. Arguments
  3. DB_NAME - The name of the database you wish to backup
  4. OPTIONS - Any additional options you wish to pass to mysqldump

You can read about the options available for use on the official MySQL
documentation.

Configuration

This container is configured using environment variables, enabling it to easily be started
manually or automatically and integrate well with Kubernetes’ configuration framework.

MINIO_SERVER=https://play.minio.io/

The Minio server you wish to send backups to.

MINIO_ACCESS_KEY=minio

The Access Key used to connect to your Minio server.

MINIO_SECRET_KEY=miniosecret

The Secret Key used to connect to your Minio server.

MINIO_BUCKET=backups

The Minio bucket you wish to store your backup in.

DATE_FORMAT=+%Y-%m-%d

The date format you would like to use when naming your backup files. Files are named $DB-$DATE.archive.