2020-09-18 07:18:39 +00:00
|
|
|
# backup-bot
|
|
|
|
|
2020-09-18 07:42:47 +00:00
|
|
|
[![Build Status](https://drone.autonomic.zone/api/badges/autonomic-cooperative/backup-bot/status.svg)](https://drone.autonomic.zone/autonomic-cooperative/backup-bot)
|
|
|
|
|
2020-09-18 07:18:39 +00:00
|
|
|
A robot who does backups in the swarm.
|
2020-09-18 07:44:42 +00:00
|
|
|
|
2020-09-18 08:33:48 +00:00
|
|
|
## Publishing
|
|
|
|
|
|
|
|
If you push a commit to master, the [Drone config](./.drone.yml) will publish to [Docker Hub](https://hub.docker.com/r/decentral1se/backup-bot).
|
|
|
|
|
2020-09-18 07:44:42 +00:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
```yaml
|
2020-09-18 08:33:48 +00:00
|
|
|
backupbot:
|
|
|
|
image: "decentral1se/backup-bot:0.0.1"
|
2020-09-22 08:51:17 +00:00
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
volumes:
|
|
|
|
- "wordpress_content:/var/www/html/wp-content/"
|
2020-09-18 08:33:48 +00:00
|
|
|
secrets:
|
2020-09-22 08:51:17 +00:00
|
|
|
- source: backup_bot_ssh_key
|
|
|
|
mode: 0400
|
|
|
|
- backup_bot_password
|
2020-09-18 08:33:48 +00:00
|
|
|
- db_password
|
|
|
|
configs:
|
|
|
|
- source: borgmatic_config_yml
|
|
|
|
target: /etc/borgmatic/config.yaml
|
|
|
|
environment:
|
2020-09-22 08:51:17 +00:00
|
|
|
- BORGBASE_REPO="foo@bar.repo.borgbase.com:repo"
|
2020-09-18 08:33:48 +00:00
|
|
|
- DB_HOST=mariadb
|
|
|
|
- DB_TABLE=wordpress
|
|
|
|
- DB_USER=wordpress
|
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 0
|
|
|
|
labels:
|
|
|
|
- "swarm.cronjob.enable=true"
|
2020-09-22 08:51:17 +00:00
|
|
|
- "swarm.cronjob.schedule=0 2 * * *" # At 02:00
|
2020-09-18 08:33:48 +00:00
|
|
|
restart_policy:
|
|
|
|
condition: none
|
2020-09-18 07:44:42 +00:00
|
|
|
```
|