Backup Bot II: This Time It's Easily Configurable
Go to file
3wc ed76e6164b Work-in-progress: split S3 & SSH storage 2021-11-09 12:37:56 +02:00
.env.sample Work-in-progress: split S3 & SSH storage 2021-11-09 12:37:56 +02:00
.envrc.sample Variables, Dockerfile, better syntax, etc. 2021-11-06 19:45:39 +02:00
Dockerfile Work-in-progress: split S3 & SSH storage 2021-11-09 12:37:56 +02:00
README.md Update TODO list and tidy up README 2021-11-09 12:27:54 +02:00
backup.sh Work-in-progress: split S3 & SSH storage 2021-11-09 12:37:56 +02:00
compose.s3.yml Work-in-progress: split S3 & SSH storage 2021-11-09 12:37:56 +02:00
compose.ssh.yml Work-in-progress: split S3 & SSH storage 2021-11-09 12:37:56 +02:00
compose.yml Work-in-progress: split S3 & SSH storage 2021-11-09 12:37:56 +02:00

README.md

Backupbot II: This Time It's Easily Configurable

Automatically backup files from running Docker Swarm services based on labels.

Background

There are lots of Docker volume backup systems; all of them have one or both of these problems:

  • You need to define all the volumes to back up in the configuration system
  • Backups require services to be stopped to take consistent copies

Backupbot II tries to solve these problems by letting you define how to back up your services using Docker labels, so you can easily collect your backups for use with another system like docker-volume-backup.

TODO

A first stab:

  • Make a Docker image of this
  • Add secret handling for database backups
  • SSH remote storage
    • Add SSH key handling
    • SSH host key checking
  • S3 remote storage
  • Re-add crond support

Future:

  • Continuous linting with shellcheck
  • Rip out or improve Restic stuff

Label format

services:
  db:
    deploy:
      labels:
        backupbot.backup: "true"
        backupbot.backup.repos: "$some_thing"
        backupbot.backup.at: "* * * * *"
        backupbot.backup.pre-hook: 'mysqldump -u root -p"$(cat /run/secrets/db_root_password)" -f /tmp/dump/dump.db'
        backupbot.backup.post-hook: "rm -rf /tmp/dump/dump.db"
        backupbot.backup.path: "/tmp/dump/"