mariadb: set single-transaction on backups

We are seeing the backups here cause the wiki to become unresponsive.
This might help it out and prevent it locking things while doing the
backups.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2025-06-01 08:02:12 -07:00
parent 2cc8fabdbf
commit f136cfec2a

View file

@ -4,7 +4,7 @@
DB=$1
# Make our latest backup
ionice -c3 /bin/mysqldump --user=root --add-drop-database $DB | /usr/bin/pxz -T2 > /backups/$DB-$(date +%F).dump.xz
ionice -c3 /bin/mysqldump --single-transaction --user=root --add-drop-database $DB | /usr/bin/pxz -T2 > /backups/$DB-$(date +%F).dump.xz
# link to the latest backup
ln -sf /backups/$DB-$(date +%F).dump.xz /backups/$DB-latest.xz