refstack: add backup
We should be backing up the user-generated refstack data Change-Id: I1bd5f0de283a4436967dcae6da9c5d9cd055697c
This commit is contained in:
parent
d33ce951c0
commit
753f9520e6
@ -23,6 +23,7 @@ groups:
|
|||||||
- review[0-9]*.openstack.org
|
- review[0-9]*.openstack.org
|
||||||
- review-dev[0-9]*.open*.org
|
- review-dev[0-9]*.open*.org
|
||||||
- zuul[0-9]*.open*.org
|
- zuul[0-9]*.open*.org
|
||||||
|
- refstack01.openstack.org
|
||||||
# All these servers are "special-cased" in specifically
|
# All these servers are "special-cased" in specifically
|
||||||
# as they are puppet and should be replaced "soon"
|
# as they are puppet and should be replaced "soon"
|
||||||
- ethercalc02.openstack.org
|
- ethercalc02.openstack.org
|
||||||
|
@ -2,3 +2,6 @@ letsencrypt_certs:
|
|||||||
refstack01-openstack-org-main:
|
refstack01-openstack-org-main:
|
||||||
- refstack01.openstack.org
|
- refstack01.openstack.org
|
||||||
- refstack.openstack.org
|
- refstack.openstack.org
|
||||||
|
borg_backup_excludes_extra:
|
||||||
|
# live db files
|
||||||
|
- /var/lib/refstack/db
|
||||||
|
@ -138,3 +138,17 @@
|
|||||||
name: logrotate
|
name: logrotate
|
||||||
vars:
|
vars:
|
||||||
logrotate_file_name: /var/backups/refstack-mariadb/refstack-mariadb.sql.gz
|
logrotate_file_name: /var/backups/refstack-mariadb/refstack-mariadb.sql.gz
|
||||||
|
|
||||||
|
- name: Setup db backup streaming job
|
||||||
|
block:
|
||||||
|
- name: Create backup streaming config dir
|
||||||
|
file:
|
||||||
|
path: /etc/borg-streams
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Create db streaming file
|
||||||
|
copy:
|
||||||
|
content: >-
|
||||||
|
/usr/local/bin/docker-compose -f /etc/refstack-docker/docker-compose.yaml exec -T mariadb
|
||||||
|
bash -c '/usr/bin/mysqldump --skip-extended-insert --databases gitea --single-transaction -uroot -p"$MYSQL_ROOT_PASSWORD"'T_PASSWORD"'
|
||||||
|
dest: /etc/borg-streams/mysql
|
||||||
|
Loading…
Reference in New Issue
Block a user