FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit d2a7ea19 authored by Dr Catherine Pitt's avatar Dr Catherine Pitt
Browse files

Redhat prepare scripts compresses MySQL backup

The incremental backups on some cluster head nodes are growing quite
large, and most of the churn is the uncompressed MySQL dumpfile which
changes with every backup and can be over 1GB. This commit compresses
that data, which reduces the size of the file by 90% on at least one
machine.
parent 17296322
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,6 @@ Priority: optional
Section: otherosfs
Maintainer: Chemistry COs <support@ch.cam.ac.uk>
Architecture: all
Version: 0.9-ch98
Version: 0.9-ch99
Depends: zfs-dkms, postgresql-13 | postgresql-9.5 | postgresql-9.4 , liblockfile-simple-perl, libdbi-perl, libjson-perl, libzfs-perl-chem, libnet-openssh-perl, libdbd-pg-perl, mbuffer, rsync, nfs-kernel-server, pv, libwww-curl-perl, libformat-human-bytes-perl
Description: a backup system using ZFS (repository 'backup-scheduler')
......@@ -31,7 +31,7 @@ ssh root@$SERVER "
# Dump MySQL, if the root user has access
if [ -f /etc/my.cnf ] ; then
SOCKET=`awk ' BEGIN {FLAG=0} (\$0 ~ /^\[/) {FLAG=0} (\$0 ~ /^\[mysqld\]/) {FLAG=1} (\$1=="socket" && FLAG==1) { print \$3 ; } ' </etc/my.cnf`
[ -S \$SOCKET ] && which mysqldump >/dev/null 2>&1 && mysqldump --all-databases >/var/adm/backup/mysql
[ -S \$SOCKET ] && which mysqldump >/dev/null 2>&1 && mysqldump --all-databases | gzip -c >/var/adm/backup/mysql.gz
fi
# Dump PostgresSQL, if the postgres user has access
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment