mariadb: use pxz with 2 threads for backups

This has anoyingly been alerting of late, so lets try and
see if we can get the backup to finish faster and avoid the
alerts on it.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2025-01-20 12:49:47 -08:00
parent b21ba1a873
commit 0e815134b7
2 changed files with 2 additions and 1 deletions

View file

@ -4,7 +4,7 @@
DB=$1
# Make our latest backup
ionice -c3 /bin/mysqldump --user=root --add-drop-database $DB | /usr/bin/xz > /backups/$DB-$(date +%F).dump.xz
ionice -c3 /bin/mysqldump --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

View file

@ -4,6 +4,7 @@
state: present
name:
- mariadb-server
- pxz
when: ansible_cmdline.ostree is not defined
- name: Ensure packages required for mariadb are installed (el8)