Coder Social home page Coder Social logo

docker-volume-backup's Introduction

docker-volume-backup

This image backups docker volumes to minio server

Usage:

docker-compose up 

Parameters

CRON_TIME       the interval of cron job to run mysqldump. `0 0 * * *` by default, which is every day at 00:00
MAX_BACKUPS     the number of backups to keep. When reaching the limit, the old backup will be discarded. No limit by default
INIT_BACKUP     if set, create a backup when the container starts
INIT_RESTORE_LATEST if set, restores latest backup

INIT_RESTORE_URL restore from minio url ex: myminio/bla/file.sql 
MINIO_HOST name of minio host ex: myminio
MINIO_HOST_URL ex: https://myminio.my.io
MINIO_ACCESS_KEY minio access key
MINIO_SECRET_KEY minio secret key

USE_RESTIC use restic instead of plain minio client
RESTIC_PASSWORD optional or autogenerated

Restore from a backup

See the list of backups, you can run:

docker exec jmcarbo/docker-volume-backup mc ls myminio/minio-bucket/

To restore database from a certain backup, simply run:

docker exec jmcarbo/docker-volume-backup /restore.sh myminio/minio-bucket/2015.08.06.171901

To display restic snapshots

docker exec jmcarbo/docker-volume-backup  restic snapshots

Minimum command line

docker run -ti --rm -e MINIO_HOST_URL=https://minio.new.imim.cloud -e MINIO_ACCESS_KEY="...." -e MINIO_SECRET_KEY="..." -e MINIO_BUCKET=test -e BACKUP_DIRS=/tmp jmcarbo/docker-volume-backup

docker-volume-backup's People

Contributors

jmcarbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.