Add borgmatic example
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luke Murphy 2020-09-22 10:52:39 +02:00
parent df7e4b9b9b
commit 725558b1db
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 43 additions and 0 deletions

View File

@ -10,6 +10,8 @@ If you push a commit to master, the [Drone config](./.drone.yml) will publish to
## Usage
### compose.yml
```yaml
backupbot:
image: "decentral1se/backup-bot:0.0.1"
@ -39,3 +41,44 @@ backupbot:
restart_policy:
condition: none
```
### borgmatic.yml
```yaml
location:
source_directories:
- /var/www/html/wp-content
repositories:
- {{ env "BORGBASE_REPO" }}
storage:
compression: auto,zstd
encryption_passphrase: {{ secret "backup_bot_password" }}
archive_name_format: "{hostname}-{now}"
ssh_command: "ssh -o 'StrictHostKeyChecking no' -i /run/secrets/backup_bot_ssh_key"
retention:
keep_daily: 3
keep_weekly: 4
keep_monthly: 12
keep_yearly: 2
prefix: "{hostname}-"
consistency:
checks:
- disabled
check_last: 3
prefix: "{hostname}-"
hooks:
before_backup:
- echo "`date` - Starting backup"
after_backup:
- echo "`date` - Finished backup"
mysql_databases:
- name: {{ env "DB_TABLE" }}
hostname: {{ env "DB_HOST" }}
port: 3306
username: {{ env "DB_USER" }}
password: {{ secret "db_password" }}
```