gerrit: only backup accountPatchReviewDb
Due to [1] --all-databases is no longer working with our version of database. Move to explicitly backing up the only database we care about now, which is accountPatchReviewDb; everything else is in notedb. [1] https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1914695 Change-Id: Iab2a8ab612cc0a0f10c90123f2936c0abda9e76f
This commit is contained in:
parent
56277bf70a
commit
98f3d42ab0
@ -326,7 +326,7 @@
|
|||||||
user: root
|
user: root
|
||||||
hour: 0
|
hour: 0
|
||||||
minute: 0
|
minute: 0
|
||||||
job: '/usr/bin/mysqldump --defaults-file=/root/.gerrit_db.cnf --opt --ignore-table mysql.event --all-databases --single-transaction | gzip -9 > /home/gerrit2/mysql_backups/gerrit.sql.gz'
|
job: '/usr/bin/mysqldump --defaults-file=/root/.gerrit_db.cnf --opt --ignore-table mysql.event --single-transaction --databases accountPatchReviewDb | gzip -9 > /home/gerrit2/mysql_backups/gerrit.sql.gz'
|
||||||
|
|
||||||
# Gerrit rotates their own logs, but doesn't clean them out
|
# Gerrit rotates their own logs, but doesn't clean them out
|
||||||
# Delete logs older than a month
|
# Delete logs older than a month
|
||||||
@ -346,8 +346,17 @@
|
|||||||
path: /etc/borg-streams
|
path: /etc/borg-streams
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Create db streaming file
|
# NOTE(ianw) 2021-02-09 --all-databases stopped working with
|
||||||
|
# Xenial/our rax version of mysql so we have to backup db's
|
||||||
|
# explicitly. remove the old call. This can go after a
|
||||||
|
# deployment run.
|
||||||
|
- name: Remove old stream backup
|
||||||
|
file:
|
||||||
|
state: absent
|
||||||
|
path: /etc/borg-streams/mysql
|
||||||
|
|
||||||
|
- name: Create accountPatchReviewDb streaming file
|
||||||
copy:
|
copy:
|
||||||
content: >-
|
content: >-
|
||||||
/usr/bin/mysqldump --defaults-file=/root/.gerrit_db.cnf --skip-extended-insert --ignore-table mysql.event --all-databases --single-transaction
|
/usr/bin/mysqldump --defaults-file=/root/.gerrit_db.cnf --skip-extended-insert --ignore-table mysql.event --single-transaction --databases accountPatchReviewDb
|
||||||
dest: /etc/borg-streams/mysql
|
dest: /etc/borg-streams/mysql-accountPatchReviewDb
|
||||||
|
Loading…
Reference in New Issue
Block a user