Changes of Revision 36
[-] [+] | Changed | automysqlbackup-2.6.9.sh |
@@ -842,7 +842,7 @@ fi # Weekly Backup - if [ ${DNOW} = ${DOWEEKLY} ]; then + if [ "${DNOW}" = "${DOWEEKLY}" ]; then ${ECHO} Weekly Backup of Database \( ${DB} \) ${ECHO} if [ "$PERTABLE" = "yes" ]; @@ -950,7 +950,7 @@ ${ECHO} Backup Start `${DATEC}` ${ECHO} ====================================================================== # Monthly Full Backup of all Databases - if [ ${DOM} = "01" ]; then + if [ "${DOM}" = "01" ]; then ${ECHO} Monthly full Backup of \( ${MDBNAMES} \)... if [ "$PIPECOMP" = "yes" ]; then dbdump_comp "$MDBNAMES" "$BACKUPDIR/monthly/$DATE.$M.all-databases.sql" @@ -972,7 +972,7 @@ fi # Weekly Backup - if [ ${DNOW} = ${DOWEEKLY} ]; then + if [ "${DNOW}" = "${DOWEEKLY}" ]; then ${ECHO} Weekly Backup of Databases \( ${DBNAMES} \) ${ECHO} ${ECHO} | ||
[-] [+] | Changed | multimysqlbackup.sh ^ |
@@ -36,10 +36,13 @@ for LINE in `cat ${CONFPATH} | grep -v ^# | grep -v ^$ | sed -e s@" "@"%20%"@g` ; do - # format: host;user;password;databases_separated_by_spaces;databases_to_exclude_separated_by_spaces;tables_to_exclude + #format: host[:port];user;password;databases_separated_by_spaces;exclude_databases;exclude_tables;compression;quiet_rotation{no|yes} export DBHOST=`echo ${LINE} | awk -F\; '{print $1}' | awk -F: '{print $1}'` export DBPORT=`echo ${LINE} | awk -F\; '{print $1}' | awk -F: '{print $2}'` + if [ -z "${DBPORT}" ] ; then + DBPORT="3306" + fi export USERNAME=`echo ${LINE} | awk -F\; '{print $2}'` export PASSWORD=`echo ${LINE} | awk -F\; '{print $3}'` export DBNAMES=`echo ${LINE} | awk -F\; '{print $4}'|sed -e s@"%20%"@" "@g` |