Only backup the gitea database on gitea hosts

During a db recovery to rebuild a host using the existing db backups
resulted in a corrupt mysql.proc table. The issue seemed to be
attempting to restore the mysql database. Instead of dumping all
databases lets just backup the one we care about: gitea.

Change-Id: Ia2c87b62736fda1c8a9ce77126e383ec74990b4a
This commit is contained in:
Clark Boylan 2019-06-27 09:53:34 -07:00
parent d696d8b273
commit 5727407486

View File

@ -148,7 +148,7 @@
user: root
job: >
/usr/bin/docker-compose -f /etc/gitea-docker/docker-compose.yaml exec -T mariadb
bash -c '/usr/bin/mysqldump --opt --ignore-table mysql.event --all-databases --single-transaction -uroot -p"$MYSQL_ROOT_PASSWORD"' |
bash -c '/usr/bin/mysqldump --opt --databases gitea --single-transaction -uroot -p"$MYSQL_ROOT_PASSWORD"' |
gzip -9 > /var/backups/gitea-mariadb/gitea-mariadb.sql.gz
minute: 42
hour: 4