backup-bot-two/README.md

43 lines
1.3 KiB
Markdown
Raw Normal View History

2021-10-25 11:56:49 +00:00
# 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
2021-11-09 10:27:54 +00:00
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.
2021-10-25 11:56:49 +00:00
## TODO
2021-11-09 10:27:54 +00:00
A first stab:
- [x] Make a Docker image of this
- [x] Add secret handling for database backups
- [ ] SSH remote storage
- [ ] Add SSH key handling
- [ ] SSH host key checking
2021-11-10 20:01:57 +00:00
- [x] S3 remote storage
- [x] Re-add `crond` support
2021-11-09 10:27:54 +00:00
Future:
2021-10-25 11:57:16 +00:00
- [ ] Continuous linting with shellcheck
2021-11-09 10:27:54 +00:00
- [ ] Rip out or improve Restic stuff
2021-10-25 11:56:49 +00:00
## Label format
```
services:
db:
2021-10-25 11:56:49 +00:00
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/"
```