Sign inSign up

xylphid/backup-n-sync

By xylphid

•Updated about 6 years ago

Image
0

309

xylphid/backup-n-sync repository overview

⁠Backup

Backup is a simple lightweight tool to backup your databases.
It parse any of your running container to find databases, connects to each one of them and execute a simple backup using native provided tools.
Supported databases :

  • MySQL
  • MongoDB
  • PostgreSQL

It keeps :

  • The first backup of each month
  • The last 14 backups

To backup multiple databases, please provide db.backup.multiple label to the database container.

⁠Supported tags

⁠How to use this image

⁠Environments

Here are supported environments variable and its definition :

  • CRONFIG : Crontab scheduling (default : "0 23 * * *")
⁠Running the container
$ docker run -d --name backup \
    -v //var/run/docker.sock:/var/run//docker.sock \
    -v /path/to/backups:/opt/backups
    xylphid/db-backup-n-sync:latest
⁠How to compose with this image
version: "3"

services:
  cron:
    environment:
      CRONFIG: "0 23 * * *"
    image: xylphid/db-backup-n-sync:latest
    volumes:
      - //var/run/docker.sock:/var/run/docker.sock
      - backup-volume:/opt/backups/
      - backup-nas-volume:/opt/backups-dist/
⁠Swarm reflexion

On swarm, you may use this image on global mode.

version: "3"

services:
  cron:
    deploy:
      mode: global
      restart_policy:
        condition: on-failure
      update_config:
        delay: 20s
        failure_action: rollback
        monitor: 30s
        order: start-first
    environment:
      CRONFIG: "0 23 * * *"
    image: xylphid/db-backup-n-sync:latest
    volumes:
      - //var/run/docker.sock:/var/run/docker.sock
      - backup-volume:/opt/backups/

⁠Image inheritance

This docker image inherits from xylphid/backup⁠ image.

Tag summary

Content type

Image

Digest

Size

60.9 MB

Last updated

about 6 years ago

docker pull xylphid/backup-n-sync:1.0