[-]
[+]
|
Changed |
automysqlbackup.spec
|
|
[-]
[+]
|
Added |
automysqlbackup-2.5.1-patches.diff
^
|
@@ -0,0 +1,429 @@
+--- automysqlbackup-2.5.1-01.sh.orig 2011-01-23 14:58:59.906151366 +0100
++++ automysqlbackup-2.5.1-01.sh 2011-01-23 17:58:06.919640733 +0100
+@@ -36,19 +36,19 @@
+ # (copy a new version to its location) without the need for editing it.
+ ### START CFG ###
+ # Username to access the MySQL server e.g. dbuser
+- USERNAME=debian
++ USERNAME=`echo ${USERNAME:=dbuser}`
+
+ # Password to access the MySQL server e.g. password
+- PASSWORD=
++ PASSWORD=`echo ${PASSWORD:=password}`
+
+ # Host name (or IP address) of MySQL server e.g localhost
+- DBHOST=localhost
++ DBHOST=`echo ${DBHOST:=localhost}`
+
+ # List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
+- DBNAMES="all"
++ DBNAMES=`echo ${DBNAMES:="DB1 DB2 DB3"}`
+
+ # Backup directory location e.g /backups
+- BACKUPDIR="/srv/backup/db"
++ BACKUPDIR=`echo ${BACKUPDIR:="/backup/mysql/${DBHOST}"}`
+
+ # Mail setup
+ # What would you like to be mailed to you?
+@@ -64,6 +64,8 @@
+ # Email Address to send mail to? (user@domain.com)
+ MAILADDR="maintenance@example.com"
+
++ # Email Address to send mail from? (root@host.tld)
++ FROMADDR="automysqlbackup@`hostname -f`"
+
+ # ============================================================
+ # === ADVANCED OPTIONS ( Read the doc's below for details )===
+@@ -73,10 +75,10 @@
+ MDBNAMES="${DBNAMES}"
+
+ # List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes)
+- DBEXCLUDE=""
++ DBEXCLUDE=`echo ${DBEXCLUDE:=""}`
+
+ # Include CREATE DATABASE in backup?
+- CREATE_DATABASE=no
++ CREATE_DATABASE=yes
+
+ # Separate backup directory and file for each DB? (yes or no)
+ SEPDIR=yes
+@@ -85,8 +87,11 @@
+ DOWEEKLY=6
+
+ # Choose Compression type. (gzip or bzip2)
+- COMP=gzip
+-
++ COMP=bzip2
++
++ # Use pipe compress
++ PIPECOMP=yes
++
+ # Compress communications between backup server and MySQL server?
+ COMMCOMP=no
+
+@@ -98,7 +103,10 @@
+
+ # For connections to localhost. Sometimes the Unix socket file must be specified.
+ SOCKET=
+-
++
++ # Backup databases per table work if SEPDIR set to `yes'
++ PERTABLE=yes
++
+ # Command to run before backups (uncomment to use)
+ #PREBACKUP="/etc/mysql-backup-pre"
+
+@@ -508,13 +516,51 @@
+ return $?
+ }
+
++dbdump_comp () {
++if [ "$COMP" = "gzip" ]; then
++ ${ECHO} Backup Information for "${1}.gz"
++ SUFFIX=".gz"
++ ${MYSQLDUMP} --user=${USERNAME} --password=${PASSWORD} --host=${DBHOST} ${OPT} ${1} | ${GZIP} > ${2}${SUFFIX}
++ ${GZIP} -l "$1.gz"
++elif [ "$COMP" = "bzip2" ]; then
++ ${ECHO} Compression information for "${1}.bz2"
++ SUFFIX=".bz2"
++ ${MYSQLDUMP} --user=${USERNAME} --password=${PASSWORD} --host=${DBHOST} ${OPT} ${1} | ${BZIP2} -v 2>&1 > ${2}${SUFFIX}
++else
++ ${ECHO} "No compression option set, check advanced settings"
++fi
++return $?
++}
++
++dbdump_table () {
++${MYSQLDUMP} --user=${USERNAME} --password=${PASSWORD} --host=${DBHOST} ${OPT} ${1} ${2} > ${3}
++return $?
++}
++
++dbdump_table_comp () {
++if [ "${COMP}" = "gzip" ]; then
++ echo
++ echo Backup Information for "$3.gz"
++ SUFFIX=".gz"
++ ${MYSQLDUMP} --user=${USERNAME} --password=${PASSWORD} --host=${DBHOST} ${OPT} ${1} ${2} | ${GZIP} > ${3}${SUFFIX}
++ ${GZIP} -l "${3}.gz"
++elif [ "${COMP}" = "bzip2" ]; then
++ echo Compression information for "${3}.bz2"
++ SUFFIX=".bz2"
++ ${MYSQLDUMP} --user=${USERNAME} --password=${PASSWORD} --host=${DBHOST} ${OPT} ${1} ${2} | ${BZIP2} -v 2>&1 > ${3}${SUFFIX}
++else
++ echo "No compression option set, check advanced settings"
++fi
++return $?
++}
++
+ # Compression function plus latest copy
+ SUFFIX=""
+ compression () {
+ if [ "${COMP}" = "gzip" ]; then
+ ${GZIP} -f "${1}"
+ ${ECHO}
+- ${ECHO} Backup Information for "${1}"
++ ${ECHO} Backup Information for "${1}.gz"
+ ${GZIP} -l "${1}.gz"
+ SUFFIX=".gz"
+ elif [ "${COMP}" = "bzip2" ]; then
+@@ -547,6 +593,8 @@
+ if [ "${SEPDIR}" = "yes" ]; then # Check if CREATE DATABSE should be included in Dump
+ if [ "${CREATE_DATABASE}" = "no" ]; then
+ OPT="${OPT} --no-create-db"
++ elif [ "${PERTABLE}" = "yes" ]; then
++ OPT="${OPT} --no-create-db"
+ else
+ OPT="${OPT} --databases"
+ fi
+@@ -596,19 +644,43 @@
+ # Prepare ${DB} for using
+ MDB="`${ECHO} ${MDB} | ${SED} 's/%/ /g'`"
+
+- if [ ! -e "${BACKUPDIR}/monthly/${MDB}" ] # Check Monthly DB Directory exists.
+- then
+- mkdir -p "${BACKUPDIR}/monthly/${MDB}"
++ if [ "${PERTABLE}" = "yes" ]; # Check backup per table
++ then # Start Monthly DB backup per table
++ echo Monthly Backup of ${MDB} per table...
++ TABLES="`${MYSQL} --user=${USERNAME} --password=${PASSWORD} --host=${DBHOST} --batch --skip-column-names -e "show tables" ${MDB} | sed 's/ /%/g'`"
++ for TABLE in $TABLES
++ do
++ if [ ! -e "${BACKUPDIR}/monthly/${MDB}_pertable/${MDB}_pertable_${DATE}.${M}.${MDB}" ] # Check Monthly DB per table Directory exists.
++ then
++ mkdir -p "${BACKUPDIR}/monthly/${MDB}_pertable/${MDB}_pertable_${DATE}.${M}.${MDB}"
++ fi
++ if [ "${PIPECOMP}" = "yes" ]; then
++ dbdump_table_comp "${MDB}" "${TABLE}" "${BACKUPDIR}/monthly/${MDB}_pertable/${MDB}_pertable_${DATE}.${M}.${MDB}/${TABLE}.sql"
++ BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/monthly/${MDB}_pertable/${MDB}_pertable_${DATE}.${M}.${MDB}/${TABLE}.sql${SUFFIX}"
++ else
++ dbdump_table "${MDB}" "${TABLE}" "${BACKUPDIR}/monthly/${MDB}_pertable/${MDB}_pertable_${DATE}.${M}.${MDB}/${TABLE}.sql"
++ compression "${BACKUPDIR}/monthly/${MDB}_pertable/${MDB}_pertable_${DATE}.${M}.${MDB}/${TABLE}.sql"
++ BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/monthly/${MDB}_pertable/${MDB}_pertable_${DATE}.${M}.${MDB}/${TABLE}.sql${SUFFIX}"
++ fi
++ done
++ echo ----------------------------------------------------------------------
++ else # Start Monthly DB full
++ if [ ! -e "${BACKUPDIR}/monthly/${MDB}" ] # Check Monthly DB Directory exists.
++ then
++ mkdir -p "${BACKUPDIR}/monthly/${MDB}"
++ fi
++
++ echo Monthly Backup of ${MDB}...
++ if [ "${PIPECOMP}" = "yes" ]; then
++ dbdump_comp "${MDB}" "${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql"
++ BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql${SUFFIX}"
++ else
++ dbdump "${MDB}" "${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql"
++ compression "${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql"
++ BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql${SUFFIX}"
++ fi
++ echo ----------------------------------------------------------------------
+ fi
+- ${ECHO} Monthly Backup of ${MDB}...
+- dbdump "${MDB}" "${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql"
+- [ $? -eq 0 ] && {
+- ${ECHO} "Rotating 5 month backups for ${MDB}"
+- ${FIND} "${BACKUPDIR}/monthly/${MDB}" -mtime +150 -type f -exec ${RM} -v {} \;
+- }
+- compression "${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql"
+- BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql${SUFFIX}"
+- ${ECHO} ----------------------------------------------------------------------
+ done
+ fi
+
+@@ -618,40 +690,119 @@
+ DB="`${ECHO} ${DB} | ${SED} 's/%/ /g'`"
+
+ # Create Seperate directory for each DB
+- if [ ! -e "${BACKUPDIR}/daily/${DB}" ] # Check Daily DB Directory exists.
++ if [ "${PERTABLE}" = "yes" ];
|
[-]
[+]
|
Deleted |
automysqlbackup.sh.mailfrom.patch
^
|
@@ -1,38 +0,0 @@
---- automysqlbackup.sh.2.5.orig 2009-05-23 17:58:36.000000000 +0200
-+++ automysqlbackup.sh.2.5 2009-05-23 19:34:20.000000000 +0200
-@@ -53,6 +53,8 @@
- # Email Address to send mail to? (user@domain.com)
- MAILADDR="user@domain.com"
-
-+# Email Address to send mail from? (root@host.tld)
-+FROMADDR="automysqlbackup@`hostname -f`"
-
- # ============================================================
- # === ADVANCED OPTIONS ( Read the doc's below for details )===
-@@ -644,21 +646,21 @@
- BACKUPFILES=`echo "$BACKUPFILES" | sed -e "s# # -a #g"` #enable multiple attachments
- mutt -s "$ERRORNOTE MySQL Backup Log and SQL Files for $HOST - $DATE" $BACKUPFILES $MAILADDR < $LOGFILE #send via mutt
- else
-- cat "$LOGFILE" | mail -s "WARNING! - MySQL Backup exceeds set maximum attachment size on $HOST - $DATE" $MAILADDR
-+ cat "$LOGFILE" | mail -r ${FROMADDR} -s "WARNING! - MySQL Backup exceeds set maximum attachment size on $HOST - $DATE" $MAILADDR
- fi
- elif [ "$MAILCONTENT" = "log" ]
- then
-- cat "$LOGFILE" | mail -s "MySQL Backup Log for $HOST - $DATE" $MAILADDR
-+ cat "$LOGFILE" | mail -r ${FROMADDR} -s "MySQL Backup Log for $HOST - $DATE" $MAILADDR
- if [ -s "$LOGERR" ]
- then
-- cat "$LOGERR" | mail -s "ERRORS REPORTED: MySQL Backup error Log for $HOST - $DATE" $MAILADDR
-+ cat "$LOGERR" | mail -r ${FROMADDR} -s "ERRORS REPORTED: MySQL Backup error Log for $HOST - $DATE" $MAILADDR
- fi
- elif [ "$MAILCONTENT" = "quiet" ]
- then
- if [ -s "$LOGERR" ]
- then
-- cat "$LOGERR" | mail -s "ERRORS REPORTED: MySQL Backup error Log for $HOST - $DATE" $MAILADDR
-- cat "$LOGFILE" | mail -s "MySQL Backup Log for $HOST - $DATE" $MAILADDR
-+ cat "$LOGERR" | mail -r ${FROMADDR} -s "ERRORS REPORTED: MySQL Backup error Log for $HOST - $DATE" $MAILADDR
-+ cat "$LOGFILE" | mail -r ${FROMADDR} -s "MySQL Backup Log for $HOST - $DATE" $MAILADDR
- fi
- else
- if [ -s "$LOGERR" ]
|
[-]
[+]
|
Deleted |
automysqlbackup.sh.multihost_per_environment.patch
^
|
@@ -1,36 +0,0 @@
---- automysqlbackup.sh.2.5.orig 2009-06-26 14:18:40.000000000 +0200
-+++ automysqlbackup.sh.2.5 2009-06-26 14:18:26.000000000 +0200
-@@ -25,19 +25,19 @@
- #=====================================================================
-
- # Username to access the MySQL server e.g. dbuser
--USERNAME=dbuser
-+USERNAME=`echo ${USERNAME:=dbuser}`
-
- # Username to access the MySQL server e.g. password
--PASSWORD=password
-+PASSWORD=`echo ${PASSWORD:=password}`
-
- # Host name (or IP address) of MySQL server e.g localhost
--DBHOST=localhost
-+DBHOST=`echo ${DBHOST:=localhost}`
-
- # List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
--DBNAMES="DB1 DB2 DB3"
-+DBNAMES=`echo ${DBNAMES:="DB1 DB2 DB3"}`
-
- # Backup directory location e.g /backups
--BACKUPDIR="/backups"
-+BACKUPDIR=`echo ${BACKUPDIR:="/backup/mysql/${DBHOST}"}`
-
- # Mail setup
- # What would you like to be mailed to you?
-@@ -62,7 +62,7 @@
- MDBNAMES="mysql $DBNAMES"
-
- # List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes)
--DBEXCLUDE=""
-+DBEXCLUDE=`echo ${DBEXCLUDE:=""}`
-
- # Include CREATE DATABASE in backup?
- CREATE_DATABASE=yes
|
[-]
[+]
|
Deleted |
automysqlbackup.sh.pipe_compression_and_pertable_and_bzip2.patch
^
|
@@ -1,357 +0,0 @@
---- automysqlbackup.sh.2.5 2006-02-15 09:19:13.000000000 -0500
-+++ automysqlbackup.sh.2.6.2.my 2008-06-23 09:37:26.000000000 -0400
-@@ -74,7 +74,10 @@
- DOWEEKLY=6
-
- # Choose Compression type. (gzip or bzip2)
--COMP=gzip
-+COMP=bzip2
-+
-+# Use pipe compress
-+PIPECOMP=yes
-
- # Compress communications between backup server and MySQL server?
- COMMCOMP=no
-@@ -88,6 +91,9 @@
- # For connections to localhost. Sometimes the Unix socket file must be specified.
- SOCKET=
-
-+# Backup databases per table work if SEPDIR set to `yes'
-+PERTABLE=yes
-+
- # Command to run before backups (uncomment to use)
- #PREBACKUP="/etc/mysql-backup-pre"
-
-@@ -342,7 +348,7 @@
- DOM=`date +%d` # Date of the Month e.g. 27
- M=`date +%B` # Month e.g January
- W=`date +%V` # Week Number e.g 37
--VER=2.5 # Version Number
-+VER=2.6.2 # Version Number
- LOGFILE=$BACKUPDIR/$DBHOST-`date +%N`.log # Logfile Name
- LOGERR=$BACKUPDIR/ERRORS_$DBHOST-`date +%N`.log # Logfile Name
- BACKUPFILES=""
-@@ -408,6 +414,46 @@
- mysqldump --user=$USERNAME --password=$PASSWORD --host=$DBHOST $OPT $1 > $2
- return 0
- }
-+dbdump_table () {
-+mysqldump --user=$USERNAME --password=$PASSWORD --host=$DBHOST $OPT $1 $2 > $3
-+return 0
-+}
-+# Database dump function with pipe compression plus latest copy
-+dbdump_comp () {
-+if [ "$COMP" = "gzip" ]; then
-+ echo
-+ echo Backup Information for "$1.gz"
-+ SUFFIX=".gz"
-+ mysqldump --user=$USERNAME --password=$PASSWORD --host=$DBHOST $OPT $1 | gzip > $2$SUFFIX
-+ gzip -l "$1.gz"
-+elif [ "$COMP" = "bzip2" ]; then
-+ echo Compression information for "$1.bz2"
-+ SUFFIX=".bz2"
-+ mysqldump --user=$USERNAME --password=$PASSWORD --host=$DBHOST $OPT $1 | bzip2 -v 2>&1 > $2$SUFFIX
-+else
-+ echo "No compression option set, check advanced settings"
-+fi
-+
-+
-+
-+return 0
-+}
-+dbdump_table_comp () {
-+if [ "$COMP" = "gzip" ]; then
-+ echo
-+ echo Backup Information for "$3.gz"
-+ SUFFIX=".gz"
-+ mysqldump --user=$USERNAME --password=$PASSWORD --host=$DBHOST $OPT $1 $2 | gzip > $3$SUFFIX
-+ gzip -l "$3.gz"
-+elif [ "$COMP" = "bzip2" ]; then
-+ echo Compression information for "$3.bz2"
-+ SUFFIX=".bz2"
-+ mysqldump --user=$USERNAME --password=$PASSWORD --host=$DBHOST $OPT $1 $2 | bzip2 -v 2>&1 > $3$SUFFIX
-+else
-+ echo "No compression option set, check advanced settings"
-+fi
-+return 0
-+}
-
- # Compression function plus latest copy
- SUFFIX=""
-@@ -415,7 +461,7 @@
- if [ "$COMP" = "gzip" ]; then
- gzip -f "$1"
- echo
-- echo Backup Information for "$1"
-+ echo Backup Information for "$1.gz"
- gzip -l "$1.gz"
- SUFFIX=".gz"
- elif [ "$COMP" = "bzip2" ]; then
-@@ -448,6 +494,8 @@
- if [ "$SEPDIR" = "yes" ]; then # Check if CREATE DATABSE should be included in Dump
- if [ "$CREATE_DATABASE" = "no" ]; then
- OPT="$OPT --no-create-db"
-+ elif [ "$PERTABLE" = "yes" ]; then
-+ OPT="$OPT --no-create-db"
- else
- OPT="$OPT --databases"
- fi
-@@ -497,15 +545,43 @@
- # Prepare $DB for using
- MDB="`echo $MDB | sed 's/%/ /g'`"
-
-- if [ ! -e "$BACKUPDIR/monthly/$MDB" ] # Check Monthly DB Directory exists.
-- then
-- mkdir -p "$BACKUPDIR/monthly/$MDB"
-+ if [ "$PERTABLE" = "yes" ]; # Check backup per table
-+ then # Start Monthly DB backup per table
-+ echo Monthly Backup of $MDB per table...
-+ TABLES="`mysql --user=$USERNAME --password=$PASSWORD --host=$DBHOST --batch --skip-column-names -e "show tables" $MDB| sed 's/ /%/g'`"
-+ for TABLE in $TABLES
-+ do
-+ if [ ! -e "$BACKUPDIR/monthly/${MDB}_pertable/${MDB}_pertable_$DATE.$M.$MDB" ] # Check Monthly DB per table Directory exists.
-+ then
-+ mkdir -p "$BACKUPDIR/monthly/${MDB}_pertable/${MDB}_pertable_$DATE.$M.$MDB"
-+ fi
-+ if [ "$PIPECOMP" = "yes" ]; then
-+ dbdump_table_comp "$MDB" "$TABLE" "$BACKUPDIR/monthly/${MDB}_pertable/${MDB}_pertable_$DATE.$M.$MDB/$TABLE.sql"
-+ BACKUPFILES="$BACKUPFILES $BACKUPDIR/monthly/${MDB}_pertable/${MDB}_pertable_$DATE.$M.$MDB/$TABLE.sql$SUFFIX"
-+ else
-+ dbdump_table "$MDB" "$TABLE" "$BACKUPDIR/monthly/${MDB}_pertable/${MDB}_pertable_$DATE.$M.$MDB/$TABLE.sql"
-+ compression "$BACKUPDIR/monthly/${MDB}_pertable/${MDB}_pertable_$DATE.$M.$MDB/$TABLE.sql"
-+ BACKUPFILES="$BACKUPFILES $BACKUPDIR/monthly/${MDB}_pertable/${MDB}_pertable_$DATE.$M.$MDB/$TABLE.sql$SUFFIX"
-+ fi
-+ done
-+ echo ----------------------------------------------------------------------
-+ else # Start Monthly DB full
-+ if [ ! -e "$BACKUPDIR/monthly/$MDB" ] # Check Monthly DB Directory exists.
-+ then
-+ mkdir -p "$BACKUPDIR/monthly/$MDB"
-+ fi
-+
-+ echo Monthly Backup of $MDB...
-+ if [ "$PIPECOMP" = "yes" ]; then
-+ dbdump_comp "$MDB" "$BACKUPDIR/monthly/$MDB/${MDB}_$DATE.$M.$MDB.sql"
-+ BACKUPFILES="$BACKUPFILES $BACKUPDIR/monthly/$MDB/${MDB}_$DATE.$M.$MDB.sql$SUFFIX"
-+ else
-+ dbdump "$MDB" "$BACKUPDIR/monthly/$MDB/${MDB}_$DATE.$M.$MDB.sql"
-+ compression "$BACKUPDIR/monthly/$MDB/${MDB}_$DATE.$M.$MDB.sql"
-+ BACKUPFILES="$BACKUPFILES $BACKUPDIR/monthly/$MDB/${MDB}_$DATE.$M.$MDB.sql$SUFFIX"
-+ fi
-+ echo ----------------------------------------------------------------------
- fi
-- echo Monthly Backup of $MDB...
-- dbdump "$MDB" "$BACKUPDIR/monthly/$MDB/${MDB}_$DATE.$M.$MDB.sql"
-- compression "$BACKUPDIR/monthly/$MDB/${MDB}_$DATE.$M.$MDB.sql"
-- BACKUPFILES="$BACKUPFILES $BACKUPDIR/monthly/$MDB/${MDB}_$DATE.$M.$MDB.sql$SUFFIX"
-- echo ----------------------------------------------------------------------
- done
- fi
-
-@@ -515,44 +591,124 @@
- DB="`echo $DB | sed 's/%/ /g'`"
-
- # Create Seperate directory for each DB
-- if [ ! -e "$BACKUPDIR/daily/$DB" ] # Check Daily DB Directory exists.
-- then
-- mkdir -p "$BACKUPDIR/daily/$DB"
-- fi
--
-- if [ ! -e "$BACKUPDIR/weekly/$DB" ] # Check Weekly DB Directory exists.
-- then
-- mkdir -p "$BACKUPDIR/weekly/$DB"
-+
-+ if [ "$PERTABLE" = "yes" ];
-+ then
-+ if [ ! -e "$BACKUPDIR/daily/${DB}_pertable" ] # Check Daily DB per table Directory exists.
-+ then
-+ mkdir -p "$BACKUPDIR/daily/${DB}_pertable"
-+ fi
-+
-+ if [ ! -e "$BACKUPDIR/weekly/${DB}_pertable" ] # Check Weekly DB per table Directory exists.
-+ then
-+ mkdir -p "$BACKUPDIR/weekly/${DB}_pertableE"
-+ fi
-+ else
-+ if [ ! -e "$BACKUPDIR/daily/$DB" ] # Check Daily DB Directory exists.
-+ then
-+ mkdir -p "$BACKUPDIR/daily/$DB"
-+ fi
-+
-+ if [ ! -e "$BACKUPDIR/weekly/$DB" ] # Check Weekly DB Directory exists.
-+ then
-+ mkdir -p "$BACKUPDIR/weekly/$DB"
-+ fi
- fi
-
- # Weekly Backup
- if [ $DNOW = $DOWEEKLY ]; then
- echo Weekly Backup of Database \( $DB \)
-- echo Rotating 5 weeks Backups...
-- if [ "$W" -le 05 ];then
-- REMW=`expr 48 + $W`
-- elif [ "$W" -lt 15 ];then
-- REMW=0`expr $W - 5`
-- else
-- REMW=`expr $W - 5`
-+ if [ "$PERTABLE" = "yes" ];
-+ then
-+
|
[-]
[+]
|
Added |
automysqlbackup-2.5.1-01.sh
^
|
@@ -0,0 +1,789 @@
+#!/bin/bash
+#
+# MySQL Backup Script
+# VER. 2.5.1 - http://sourceforge.net/projects/automysqlbackup/
+# Copyright (c) 2002-2003 wipe_out@lycos.co.uk
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#=====================================================================
+#=====================================================================
+# Set the following variables to your system needs
+# (Detailed instructions below variables)
+#=====================================================================
+#set -x
+CONFIGFILE="/etc/automysqlbackup/automysqlbackup.conf"
+
+if [ -r ${CONFIGFILE} ]; then
+ # Read the configfile if it's existing and readable
+ source ${CONFIGFILE}
+else
+ # do inline-config otherwise
+ # To create a configfile just copy the code between "### START CFG ###" and "### END CFG ###"
+ # to /etc/automysqlbackup/automysqlbackup.conf. After that you're able to upgrade this script
+ # (copy a new version to its location) without the need for editing it.
+ ### START CFG ###
+ # Username to access the MySQL server e.g. dbuser
+ USERNAME=debian
+
+ # Password to access the MySQL server e.g. password
+ PASSWORD=
+
+ # Host name (or IP address) of MySQL server e.g localhost
+ DBHOST=localhost
+
+ # List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
+ DBNAMES="all"
+
+ # Backup directory location e.g /backups
+ BACKUPDIR="/srv/backup/db"
+
+ # Mail setup
+ # What would you like to be mailed to you?
+ # - log : send only log file
+ # - files : send log file and sql files as attachments (see docs)
+ # - stdout : will simply output the log to the screen if run manually.
+ # - quiet : Only send logs if an error occurs to the MAILADDR.
+ MAILCONTENT="log"
+
+ # Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
+ MAXATTSIZE="4000"
+
+ # Email Address to send mail to? (user@domain.com)
+ MAILADDR="maintenance@example.com"
+
+
+ # ============================================================
+ # === ADVANCED OPTIONS ( Read the doc's below for details )===
+ #=============================================================
+
+ # List of DBBNAMES for Monthly Backups.
+ MDBNAMES="${DBNAMES}"
+
+ # List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes)
+ DBEXCLUDE=""
+
+ # Include CREATE DATABASE in backup?
+ CREATE_DATABASE=no
+
+ # Separate backup directory and file for each DB? (yes or no)
+ SEPDIR=yes
+
+ # Which day do you want weekly backups? (1 to 7 where 1 is Monday)
+ DOWEEKLY=6
+
+ # Choose Compression type. (gzip or bzip2)
+ COMP=gzip
+
+ # Compress communications between backup server and MySQL server?
+ COMMCOMP=no
+
+ # Additionally keep a copy of the most recent backup in a seperate directory.
+ LATEST=no
+
+ # The maximum size of the buffer for client/server communication. e.g. 16MB (maximum is 1GB)
+ MAX_ALLOWED_PACKET=
+
+ # For connections to localhost. Sometimes the Unix socket file must be specified.
+ SOCKET=
+
+ # Command to run before backups (uncomment to use)
+ #PREBACKUP="/etc/mysql-backup-pre"
+
+ # Command run after backups (uncomment to use)
+ #POSTBACKUP="/etc/mysql-backup-post"
+ ### END CFG ###
+fi
+
+#=====================================================================
+# Options documantation
+#=====================================================================
+# Set USERNAME and PASSWORD of a user that has the appropriate permissions
+# to backup ALL databases. (See mysql documentation for details)
+# NEW in 2.5.1:
+# - If USERNAME is set to "debian" and PASSWORD is unset or "" obtain
+# them from the file /etc/mysql/debian.cnf
+# - First command line option "-c" for configfile
+# - Interpretable Exit-States:
+# 1: given configfile is not readable or does not exist
+# 2: unknown option
+#
+# Set the DBHOST option to the server you wish to backup, leave the
+# default to backup "this server".(to backup multiple servers make
+# copies of this file and set the options for that server)
+#
+# Put in the list of DBNAMES(Databases)to be backed up. If you would like
+# to backup ALL DBs on the server set DBNAMES="all".(if set to "all" then
+# any new DBs will automatically be backed up without needing to modify
+# this backup script when a new DB is created).
+#
+# If the DB you want to backup has a space in the name replace the space
+# with a % e.g. "data base" will become "data%base"
+# NOTE: Spaces in DB names may not work correctly when SEPDIR=no.
+#
+# You can change the backup storage location from /backups to anything
+# you like by using the BACKUPDIR setting..
+#
+# The MAILCONTENT and MAILADDR options and pretty self explanitory, use
+# these to have the backup log mailed to you at any email address or multiple
+# email addresses in a space seperated list.
+# (If you set mail content to "log" you will require access to the "mail" program
+# on your server. If you set this to "files" you will have to have mutt installed
+# on your server. If you set it to "stdout" it will log to the screen if run from
+# the console or to the cron job owner if run through cron. If you set it to "quiet"
+# logs will only be mailed if there are errors reported. )
+#
+# MAXATTSIZE sets the largest allowed email attachments total (all backup files) you
+# want the script to send. This is the size before it is encoded to be sent as an email
+# so if your mail server will allow a maximum mail size of 5MB I would suggest setting
+# MAXATTSIZE to be 25% smaller than that so a setting of 4000 would probably be fine.
+#
+# Finally copy automysqlbackup.sh to anywhere on your server and make sure
+# to set executable permission. You can also copy the script to
+# /etc/cron.daily to have it execute automatically every night or simply
+# place a symlink in /etc/cron.daily to the file if you wish to keep it
+# somwhere else.
+# NOTE:On Debian copy the file with no extention for it to be run
+# by cron e.g just name the file "automysqlbackup"
+#
+# Thats it..
+#
+#
+# === Advanced options doc's ===
+#
+# The list of MDBNAMES is the DB's to be backed up only monthly. You should
+# always include "mysql" in this list to backup your user/password
+# information along with any other DBs that you only feel need to
+# be backed up monthly. (if using a hosted server then you should
+# probably remove "mysql" as your provider will be backing this up)
+# NOTE: If DBNAMES="all" then MDBNAMES has no effect as all DBs will be backed
+# up anyway.
+#
+# If you set DBNAMES="all" you can configure the option DBEXCLUDE. Other
+# wise this option will not be used.
+# This option can be used if you want to backup all dbs, but you want
+# exclude some of them. (eg. a db is to big).
+#
+# Set CREATE_DATABASE to "yes" (the default) if you want your SQL-Dump to create
+# a database with the same name as the original database when restoring.
+# Saying "no" here will allow your to specify the database name you want to
+# restore your dump into, making a copy of the database by using the dump
+# created with automysqlbackup.
+# NOTE: Not used if SEPDIR=no
+#
+# The SEPDIR option allows you to choose to have all DBs backed up to
+# a single file (fast restore of entire server in case of crash) or to
+# seperate directories for each DB (each DB can be restored seperately
+# in case of single DB corruption or loss).
+#
+# To set the day of the week that you would like the weekly backup to happen
+# set the DOWEEKLY setting, this can be a value from 1 to 7 where 1 is Monday,
+# The default is 6 which means that weekly backups are done on a Saturday.
+#
+# COMP is used to choose the copmression used, options are gzip or bzip2.
+# bzip2 will produce slightly smaller files but is more processor intensive so
+# may take longer to complete.
+#
+# COMMCOMP is used to enable or diable mysql client to server compression, so
|
[-]
[+]
|
Added |
automysqlbackup.8
^
|
@@ -0,0 +1,91 @@
+.TH automysqlbackup 8 "6 Sep 2008" "wipe_out" "Automatically backup MySQL"
+.SH NAME
+automysqlbackup \- backup all of your database daily, weekly, and monthly
+.SH SYNOPSIS
+ automysqlbackup
+.br
+.SH DESCRIPTION
+ This manual page documents briefly the
+.B automysqlbackup
+command.
+.PP
+ configuration is stored within the
+.RI /etc/default/automysqlbackup
+file
+.PP
+.SH PARAMETERS
+.br
+.TP
+\fBUSERNAME=\fPdbuser
+Username to access the MySQL server e.g. dbuser
+.TP
+\fBPASSWORD=\fP"password"
+Username to access the MySQL server e.g. password
+.TP
+\fBDBHOST=\fPlocalhost
+Host name (or IP address) of MySQL server e.g localhost
+.TP
+\fBDBNAMES=\fP"DB1 DB2 DB3"
+List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
+.TP
+\fBBACKUPDIR=\fP"/backups"
+Backup directory location e.g /backups
+.br
+.PP
+.TP
+\fBMAILCONTENT=\fP"stdout"
+Mail setup
+What would you like to be mailed to you?
+ - log : send only log file
+ - files : send log file and sql files as attachments (see docs)
+ - stdout : will simply output the log to the screen if run manually.
+ - quiet : Only send logs if an error occurs to the MAILADDR.
+.TP
+\fBMAXATTSIZE=\fP"4000"
+Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
+.TP
+\fBMAILADDR=\fP"user@domain.com"
+Email Address to send mail to? (user@domain.com)
+.PP
+.SH ADVANCED OPTIONS
+.TP
+\fBMDBNAMES=\fP"mysql $DBNAMES"
+List of \fIDBBNAMES\fR for Monthly Backups.
+.TP
+\fBDBEXCLUDE=\fP""
+List of \fIDBNAMES\fP to EXCLUDE if DBNAMES are set to all (must be in " quotes)
+.TP
+\fBCREATE_DATABASE=\fPyes
+Include CREATE DATABASE in backup?
+.TP
+\fBSEPDIR=\fPyes
+Separate backup directory and file for each DB? (yes or no)
+.TP
+\fBDOWEEKLY=\fP6
+Which day do you want weekly backups at? (1 to 7 where 1 is Monday)
+.TP
+\fBCOMP=\fPgzip
+Choose Compression type. (gzip or bzip2)
+.TP
+\fBCOMMCOMP=\fPno
+Compress communications between backup server and MySQL server?
+.TP
+\fBLATEST\fP=no
+Additionally keep a copy of the most recent backup in a seperate directory.
+.TP
+\fBMAX_ALLOWED_PACKET=\fP
+The maximum size of the buffer for client/server communication. e.g. 16MB (maximum i
+.TP
+\fBSOCKET=\fP
+For connections to localhost. Sometimes the Unix socket file must be specified.
+.TP
+\fB#PREBACKUP="/etc/automysqlbackup/mysql-backup-pre"
+Command to run before backups (uncomment to use)
+.TP
+\fB#POSTBACKUP=\fP"/etc/automysqlbackup/mysql-backup-post"
+Command run after backups (uncomment to use)
+.SH AUTHOR
+This manual page was written by Jose Luis Tallon
+.nh
+<jltallon@adv\-solutions.net>.
+for the Debian GNU/Linux system, but can be used by others.
|
[-]
[+]
|
Deleted |
automysqlbackup.sh.2.5
^
|
@@ -1,688 +0,0 @@
-#!/bin/bash
-#
-# MySQL Backup Script
-# VER. 2.5 - http://sourceforge.net/projects/automysqlbackup/
-# Copyright (c) 2002-2003 wipe_out@lycos.co.uk
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#=====================================================================
-#=====================================================================
-# Set the following variables to your system needs
-# (Detailed instructions below variables)
-#=====================================================================
-
-# Username to access the MySQL server e.g. dbuser
-USERNAME=dbuser
-
-# Username to access the MySQL server e.g. password
-PASSWORD=password
-
-# Host name (or IP address) of MySQL server e.g localhost
-DBHOST=localhost
-
-# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
-DBNAMES="DB1 DB2 DB3"
-
-# Backup directory location e.g /backups
-BACKUPDIR="/backups"
-
-# Mail setup
-# What would you like to be mailed to you?
-# - log : send only log file
-# - files : send log file and sql files as attachments (see docs)
-# - stdout : will simply output the log to the screen if run manually.
-# - quiet : Only send logs if an error occurs to the MAILADDR.
-MAILCONTENT="stdout"
-
-# Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
-MAXATTSIZE="4000"
-
-# Email Address to send mail to? (user@domain.com)
-MAILADDR="user@domain.com"
-
-
-# ============================================================
-# === ADVANCED OPTIONS ( Read the doc's below for details )===
-#=============================================================
-
-# List of DBBNAMES for Monthly Backups.
-MDBNAMES="mysql $DBNAMES"
-
-# List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes)
-DBEXCLUDE=""
-
-# Include CREATE DATABASE in backup?
-CREATE_DATABASE=yes
-
-# Separate backup directory and file for each DB? (yes or no)
-SEPDIR=yes
-
-# Which day do you want weekly backups? (1 to 7 where 1 is Monday)
-DOWEEKLY=6
-
-# Choose Compression type. (gzip or bzip2)
-COMP=gzip
-
-# Compress communications between backup server and MySQL server?
-COMMCOMP=no
-
-# Additionally keep a copy of the most recent backup in a seperate directory.
-LATEST=no
-
-# The maximum size of the buffer for client/server communication. e.g. 16MB (maximum is 1GB)
-MAX_ALLOWED_PACKET=
-
-# For connections to localhost. Sometimes the Unix socket file must be specified.
-SOCKET=
-
-# Command to run before backups (uncomment to use)
-#PREBACKUP="/etc/mysql-backup-pre"
-
-# Command run after backups (uncomment to use)
-#POSTBACKUP="/etc/mysql-backup-post"
-
-#=====================================================================
-# Options documantation
-#=====================================================================
-# Set USERNAME and PASSWORD of a user that has at least SELECT permission
-# to ALL databases.
-#
-# Set the DBHOST option to the server you wish to backup, leave the
-# default to backup "this server".(to backup multiple servers make
-# copies of this file and set the options for that server)
-#
-# Put in the list of DBNAMES(Databases)to be backed up. If you would like
-# to backup ALL DBs on the server set DBNAMES="all".(if set to "all" then
-# any new DBs will automatically be backed up without needing to modify
-# this backup script when a new DB is created).
-#
-# If the DB you want to backup has a space in the name replace the space
-# with a % e.g. "data base" will become "data%base"
-# NOTE: Spaces in DB names may not work correctly when SEPDIR=no.
-#
-# You can change the backup storage location from /backups to anything
-# you like by using the BACKUPDIR setting..
-#
-# The MAILCONTENT and MAILADDR options and pretty self explanitory, use
-# these to have the backup log mailed to you at any email address or multiple
-# email addresses in a space seperated list.
-# (If you set mail content to "log" you will require access to the "mail" program
-# on your server. If you set this to "files" you will have to have mutt installed
-# on your server. If you set it to "stdout" it will log to the screen if run from
-# the console or to the cron job owner if run through cron. If you set it to "quiet"
-# logs will only be mailed if there are errors reported. )
-#
-# MAXATTSIZE sets the largest allowed email attachments total (all backup files) you
-# want the script to send. This is the size before it is encoded to be sent as an email
-# so if your mail server will allow a maximum mail size of 5MB I would suggest setting
-# MAXATTSIZE to be 25% smaller than that so a setting of 4000 would probably be fine.
-#
-# Finally copy automysqlbackup.sh to anywhere on your server and make sure
-# to set executable permission. You can also copy the script to
-# /etc/cron.daily to have it execute automatically every night or simply
-# place a symlink in /etc/cron.daily to the file if you wish to keep it
-# somwhere else.
-# NOTE:On Debian copy the file with no extention for it to be run
-# by cron e.g just name the file "automysqlbackup"
-#
-# Thats it..
-#
-#
-# === Advanced options doc's ===
-#
-# The list of MDBNAMES is the DB's to be backed up only monthly. You should
-# always include "mysql" in this list to backup your user/password
-# information along with any other DBs that you only feel need to
-# be backed up monthly. (if using a hosted server then you should
-# probably remove "mysql" as your provider will be backing this up)
-# NOTE: If DBNAMES="all" then MDBNAMES has no effect as all DBs will be backed
-# up anyway.
-#
-# If you set DBNAMES="all" you can configure the option DBEXCLUDE. Other
-# wise this option will not be used.
-# This option can be used if you want to backup all dbs, but you want
-# exclude some of them. (eg. a db is to big).
-#
-# Set CREATE_DATABASE to "yes" (the default) if you want your SQL-Dump to create
-# a database with the same name as the original database when restoring.
-# Saying "no" here will allow your to specify the database name you want to
-# restore your dump into, making a copy of the database by using the dump
-# created with automysqlbackup.
-# NOTE: Not used if SEPDIR=no
-#
-# The SEPDIR option allows you to choose to have all DBs backed up to
-# a single file (fast restore of entire server in case of crash) or to
-# seperate directories for each DB (each DB can be restored seperately
-# in case of single DB corruption or loss).
-#
-# To set the day of the week that you would like the weekly backup to happen
-# set the DOWEEKLY setting, this can be a value from 1 to 7 where 1 is Monday,
-# The default is 6 which means that weekly backups are done on a Saturday.
-#
-# COMP is used to choose the copmression used, options are gzip or bzip2.
-# bzip2 will produce slightly smaller files but is more processor intensive so
-# may take longer to complete.
-#
-# COMMCOMP is used to enable or diable mysql client to server compression, so
-# it is useful to save bandwidth when backing up a remote MySQL server over
-# the network.
-#
-# LATEST is to store an additional copy of the latest backup to a standard
-# location so it can be downloaded bt thrid party scripts.
-#
-# If the DB's being backed up make use of large BLOB fields then you may need
-# to increase the MAX_ALLOWED_PACKET setting, for example 16MB..
-#
-# When connecting to localhost as the DB server (DBHOST=localhost) sometimes
-# the system can have issues locating the socket file.. This can now be set
-# using the SOCKET parameter.. An example may be SOCKET=/private/tmp/mysql.sock
-#
-# Use PREBACKUP and POSTBACKUP to specify Per and Post backup commands
-# or scripts to perform tasks either before or after the backup process.
-#
-#
-#=====================================================================
-# Backup Rotation..
-#=====================================================================
|
[-]
[+]
|
Deleted |
automysqlbackup.sh.2.5.orig
^
|
@@ -1,688 +0,0 @@
-#!/bin/bash
-#
-# MySQL Backup Script
-# VER. 2.5 - http://sourceforge.net/projects/automysqlbackup/
-# Copyright (c) 2002-2003 wipe_out@lycos.co.uk
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#=====================================================================
-#=====================================================================
-# Set the following variables to your system needs
-# (Detailed instructions below variables)
-#=====================================================================
-
-# Username to access the MySQL server e.g. dbuser
-USERNAME=dbuser
-
-# Username to access the MySQL server e.g. password
-PASSWORD=password
-
-# Host name (or IP address) of MySQL server e.g localhost
-DBHOST=localhost
-
-# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
-DBNAMES="DB1 DB2 DB3"
-
-# Backup directory location e.g /backups
-BACKUPDIR="/backups"
-
-# Mail setup
-# What would you like to be mailed to you?
-# - log : send only log file
-# - files : send log file and sql files as attachments (see docs)
-# - stdout : will simply output the log to the screen if run manually.
-# - quiet : Only send logs if an error occurs to the MAILADDR.
-MAILCONTENT="stdout"
-
-# Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
-MAXATTSIZE="4000"
-
-# Email Address to send mail to? (user@domain.com)
-MAILADDR="user@domain.com"
-
-
-# ============================================================
-# === ADVANCED OPTIONS ( Read the doc's below for details )===
-#=============================================================
-
-# List of DBBNAMES for Monthly Backups.
-MDBNAMES="mysql $DBNAMES"
-
-# List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes)
-DBEXCLUDE=""
-
-# Include CREATE DATABASE in backup?
-CREATE_DATABASE=yes
-
-# Separate backup directory and file for each DB? (yes or no)
-SEPDIR=yes
-
-# Which day do you want weekly backups? (1 to 7 where 1 is Monday)
-DOWEEKLY=6
-
-# Choose Compression type. (gzip or bzip2)
-COMP=gzip
-
-# Compress communications between backup server and MySQL server?
-COMMCOMP=no
-
-# Additionally keep a copy of the most recent backup in a seperate directory.
-LATEST=no
-
-# The maximum size of the buffer for client/server communication. e.g. 16MB (maximum is 1GB)
-MAX_ALLOWED_PACKET=
-
-# For connections to localhost. Sometimes the Unix socket file must be specified.
-SOCKET=
-
-# Command to run before backups (uncomment to use)
-#PREBACKUP="/etc/mysql-backup-pre"
-
-# Command run after backups (uncomment to use)
-#POSTBACKUP="/etc/mysql-backup-post"
-
-#=====================================================================
-# Options documantation
-#=====================================================================
-# Set USERNAME and PASSWORD of a user that has at least SELECT permission
-# to ALL databases.
-#
-# Set the DBHOST option to the server you wish to backup, leave the
-# default to backup "this server".(to backup multiple servers make
-# copies of this file and set the options for that server)
-#
-# Put in the list of DBNAMES(Databases)to be backed up. If you would like
-# to backup ALL DBs on the server set DBNAMES="all".(if set to "all" then
-# any new DBs will automatically be backed up without needing to modify
-# this backup script when a new DB is created).
-#
-# If the DB you want to backup has a space in the name replace the space
-# with a % e.g. "data base" will become "data%base"
-# NOTE: Spaces in DB names may not work correctly when SEPDIR=no.
-#
-# You can change the backup storage location from /backups to anything
-# you like by using the BACKUPDIR setting..
-#
-# The MAILCONTENT and MAILADDR options and pretty self explanitory, use
-# these to have the backup log mailed to you at any email address or multiple
-# email addresses in a space seperated list.
-# (If you set mail content to "log" you will require access to the "mail" program
-# on your server. If you set this to "files" you will have to have mutt installed
-# on your server. If you set it to "stdout" it will log to the screen if run from
-# the console or to the cron job owner if run through cron. If you set it to "quiet"
-# logs will only be mailed if there are errors reported. )
-#
-# MAXATTSIZE sets the largest allowed email attachments total (all backup files) you
-# want the script to send. This is the size before it is encoded to be sent as an email
-# so if your mail server will allow a maximum mail size of 5MB I would suggest setting
-# MAXATTSIZE to be 25% smaller than that so a setting of 4000 would probably be fine.
-#
-# Finally copy automysqlbackup.sh to anywhere on your server and make sure
-# to set executable permission. You can also copy the script to
-# /etc/cron.daily to have it execute automatically every night or simply
-# place a symlink in /etc/cron.daily to the file if you wish to keep it
-# somwhere else.
-# NOTE:On Debian copy the file with no extention for it to be run
-# by cron e.g just name the file "automysqlbackup"
-#
-# Thats it..
-#
-#
-# === Advanced options doc's ===
-#
-# The list of MDBNAMES is the DB's to be backed up only monthly. You should
-# always include "mysql" in this list to backup your user/password
-# information along with any other DBs that you only feel need to
-# be backed up monthly. (if using a hosted server then you should
-# probably remove "mysql" as your provider will be backing this up)
-# NOTE: If DBNAMES="all" then MDBNAMES has no effect as all DBs will be backed
-# up anyway.
-#
-# If you set DBNAMES="all" you can configure the option DBEXCLUDE. Other
-# wise this option will not be used.
-# This option can be used if you want to backup all dbs, but you want
-# exclude some of them. (eg. a db is to big).
-#
-# Set CREATE_DATABASE to "yes" (the default) if you want your SQL-Dump to create
-# a database with the same name as the original database when restoring.
-# Saying "no" here will allow your to specify the database name you want to
-# restore your dump into, making a copy of the database by using the dump
-# created with automysqlbackup.
-# NOTE: Not used if SEPDIR=no
-#
-# The SEPDIR option allows you to choose to have all DBs backed up to
-# a single file (fast restore of entire server in case of crash) or to
-# seperate directories for each DB (each DB can be restored seperately
-# in case of single DB corruption or loss).
-#
-# To set the day of the week that you would like the weekly backup to happen
-# set the DOWEEKLY setting, this can be a value from 1 to 7 where 1 is Monday,
-# The default is 6 which means that weekly backups are done on a Saturday.
-#
-# COMP is used to choose the copmression used, options are gzip or bzip2.
-# bzip2 will produce slightly smaller files but is more processor intensive so
-# may take longer to complete.
-#
-# COMMCOMP is used to enable or diable mysql client to server compression, so
-# it is useful to save bandwidth when backing up a remote MySQL server over
-# the network.
-#
-# LATEST is to store an additional copy of the latest backup to a standard
-# location so it can be downloaded bt thrid party scripts.
-#
-# If the DB's being backed up make use of large BLOB fields then you may need
-# to increase the MAX_ALLOWED_PACKET setting, for example 16MB..
-#
-# When connecting to localhost as the DB server (DBHOST=localhost) sometimes
-# the system can have issues locating the socket file.. This can now be set
-# using the SOCKET parameter.. An example may be SOCKET=/private/tmp/mysql.sock
-#
-# Use PREBACKUP and POSTBACKUP to specify Per and Post backup commands
-# or scripts to perform tasks either before or after the backup process.
-#
-#
-#=====================================================================
-# Backup Rotation..
-#=====================================================================
|