@@ -2,17 +2,24 @@
#
# Name: multimysqlbackup
# Summary: wrapper for automysqlbackup to backup multiple hosts
-# Version: 0.2
+# Version: 0.3
# Author: Carsten Schoene <cs@linux-administrator.com>
-# Last change: 21-10-2011
+# Last change: 23-08-2021
#
###############################################################################
# path to host,db definitions
CONFPATH="/etc/multimysqlbackup.conf"
+if [ $# -gt 0 ]; then
+ # include custom config
+ if [ -f "$1" ] ; then
+ CONFPATH="$1"
+ fi
+fi
+
# path to mysql backup script
-AUTOMYSQLBACKUP="/usr/sbin/automysqlbackup"
+AUTOMYSQLBACKUP="$(which automysqlbackup 2>/dev/null)"
# lock each job
LOCKJOB=1
@@ -38,6 +45,8 @@
export DBNAMES=`echo ${LINE} | awk -F\; '{print $4}'|sed -e s@"%20%"@" "@g`
export DBEXCLUDE=`echo ${LINE} | awk -F\; '{print $5}'|sed -e s@"%20%"@" "@g`
export TABLEEXCLUDE=`echo ${LINE} | awk -F\; '{print $6}'|sed -e s@"%20%"@" "@g`
+ export COMP=`echo ${LINE} | awk -F\; '{print $7}'|sed -e s@"%20%"@" "@g`
+ export QUIETROTA=`echo ${LINE} | awk -F\; '{print $8}'|sed -e s@"%20%"@" "@g`
if [ ! -f /var/lock/${DBHOST}.lock ] && [ "${LOCKJOB}" == "1" ] ; then
@@ -69,6 +78,8 @@
export DBNAMES="all"
export DBEXCLUDE=""
export TABLEEXCLUDE=""
+ export COMP="bzip2"
+ export QUIETROTA="no"
if [ ! -f /var/lock/${DBHOST}.lock ] && [ "${LOCKJOB}" == "1" ] ; then
touch /var/lock/${DBHOST}.lock
|