[borgbackup_client] precedence rules and sain defaults for borg config
This commit is contained in:
parent
59f2c94a61
commit
7480a7c565
8 changed files with 32 additions and 12 deletions
2
bdd.yml
2
bdd.yml
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Install and configure bdd servers at Saclay and at OVH
|
||||
- hosts: bdd
|
||||
- hosts: bdd,!re2o-bdd.adm.auro.re,!services-bdd-local.adm.auro.re
|
||||
roles:
|
||||
- postgresql_server
|
||||
...
|
||||
|
|
3
group_vars/bdd.yml
Normal file
3
group_vars/bdd.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
borg_keep_hourly: 6
|
||||
...
|
8
host_vars/bdd.adm.auro.re.yml_bak
Normal file
8
host_vars/bdd.adm.auro.re.yml_bak
Normal file
|
@ -0,0 +1,8 @@
|
|||
postgresql:
|
||||
version: 13
|
||||
hosts: # dbname, username, CIDR ip addr, auth method
|
||||
- [ "nextcloud", "nextcloud", "10.128.0.58", "md5" ]
|
||||
- [ "gitea", "gitea", "10.128.0.60", "md5" ]
|
||||
- [ "drone", "drone", "10.128.0.64", "md5" ]
|
||||
- [ "wikijs", "wikijs", "10.128.0.66", "md5" ]
|
||||
- [ "vote", "vote", "10.128.0.81", "md5" ]
|
|
@ -5,6 +5,7 @@ borg_keep_weekly: 4
|
|||
borg_keep_monthly: 12
|
||||
borg_backup_directories:
|
||||
- "/etc/"
|
||||
- "/var"/
|
||||
- "/data_nextcloud"
|
||||
- "/data_gitea"
|
||||
- "/data_mail"
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
---
|
||||
borg_keep_hourly: 0
|
||||
borg_keep_daily: 7
|
||||
borg_keep_weekly: 4
|
||||
borg_keep_monthly: 12
|
||||
borg_backup_directories:
|
||||
- "/etc/"
|
||||
- "/var/"
|
||||
|
|
4
hosts
4
hosts
|
@ -29,7 +29,6 @@ stream.adm.auro.re
|
|||
re2o-server.adm.auro.re
|
||||
re2o-ldap.adm.auro.re
|
||||
re2o-db.adm.auro.re
|
||||
#services-bdd-local.adm.auro.re
|
||||
backup.adm.auro.re
|
||||
mail.adm.auro.re
|
||||
wikijs.adm.auro.re
|
||||
|
@ -39,6 +38,7 @@ jitsi-aurore.adm.auro.re
|
|||
bdd.adm.auro.re
|
||||
bdd-ovh.adm.auro.re
|
||||
litl.adm.auro.re
|
||||
services-bdd-local.adm.auro.re
|
||||
|
||||
[aurore_testing_vm]
|
||||
pendragon.adm.auro.re
|
||||
|
@ -514,3 +514,5 @@ proxy.adm.auro.re
|
|||
[bdd]
|
||||
bdd.adm.auro.re
|
||||
bdd-ovh.adm.auro.re
|
||||
services-bdd-local.adm.auro.re
|
||||
re2o-bdd.adm.auro.re
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
borg_keep_daily: 7
|
||||
borg_keep_weekly: 4
|
||||
borg_keep_monthly: 12
|
||||
borg_keep_hourly: 0
|
||||
borg_keep_daily: 0
|
||||
borg_keep_weekly: 0
|
||||
borg_keep_monthly: 0
|
||||
borg_server_user: borgbackup
|
||||
borg_server_group: borgbackup
|
||||
...
|
||||
|
|
|
@ -23,9 +23,18 @@ storage:
|
|||
|
||||
|
||||
retention:
|
||||
keep_daily: {{ borg_keep_daily }}
|
||||
keep_weekly: {{ borg_keep_weekly }}
|
||||
keep_monthly: {{ borg_keep_monthly }}
|
||||
{% if borg_keep_hourly > 0 %}
|
||||
- keep_hourly: {{ borg_keep_hourly }}
|
||||
{% endif %}
|
||||
{% if borg_keep_daily > 0 %}
|
||||
- keep_hourly: {{ borg_keep_daily }}
|
||||
{% endif %}
|
||||
{% if borg_keep_weekly > 0 %}
|
||||
- keep_hourly: {{ borg_keep_weekly }}
|
||||
{% endif %}
|
||||
{% if borg_keep_monthly > 0 %}
|
||||
- keep_hourly: {{ borg_keep_monthly }}
|
||||
{% endif %}
|
||||
|
||||
consistency:
|
||||
checks:
|
||||
|
|
Loading…
Reference in a new issue