Add borgmatic example
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
df7e4b9b9b
commit
725558b1db
43
README.md
43
README.md
|
@ -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" }}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue