#------------------------------------------------------------------------------# # vi: set sw=4 ts=4 ai: ("set modeline" in ~/.exrc) # #------------------------------------------------------------------------------# # Config file : mysqlbackup.conf # # # # Author : Ton Kersten The Netherlands # # # # Date : 27-12-2010 Time : 14:34 # # # # Description : Configuration file for MySQL backup # # Keep the mode to max 0600, there's a password in here # # # # Updates : None (yet) # #------------------------------------------------------------------------------# #------------------------------------------------------------------------------# # V e r s i o n i n f o r m a t i o n # #------------------------------------------------------------------------------# # $Id:: mysqlbackup.conf 5 2013-06-03 09:01:59 tonk $: # # $Revision:: 5 $: # # $Author:: Ton Kersten $: # # $Date:: 2013-06-03 09:03:12 +0200 (Mon, 03 Jun 2013) $: # #------------------------------------------------------------------------------# # E n d o f v e r s i o n i n f o r m a t i o n # #------------------------------------------------------------------------------# #------------------------------------------------------------------------------# # Username to access the MySQL server e.g. dbuser # #------------------------------------------------------------------------------# USERNAME="root" #------------------------------------------------------------------------------# # Password to access the MySQL server (Keep it safe!!!!) # #------------------------------------------------------------------------------# PASSWORD="azerty" #------------------------------------------------------------------------------# # Back owner and group (should exist and only when running as root) # #------------------------------------------------------------------------------# OWNER="root" GROUP="root" #------------------------------------------------------------------------------# # 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" (Can be "all") # #------------------------------------------------------------------------------# DBNAMES="all" #------------------------------------------------------------------------------# # Where should the backups be placed # #------------------------------------------------------------------------------# BACKUPDIR="/backup/mysql" #------------------------------------------------------------------------------# # 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) # #------------------------------------------------------------------------------# MAXATTSIZE="4000" #------------------------------------------------------------------------------# # Email address to send mail to (user@domain.com) # #------------------------------------------------------------------------------# MAILADDR="root@localhost" #------------------------------------------------------------------------------# # List of DBBNAMES for Monthly Backups. # #------------------------------------------------------------------------------# DOMONTHLY="yes" MONTHLY_DBNAMES="mysql ${DBNAMES}" #------------------------------------------------------------------------------# # List of DBNAMES to EXCLUDE if DBNAMES are set to all (must be in " quotes) # #------------------------------------------------------------------------------# DBEXCLUDE="" #------------------------------------------------------------------------------# # List of TBNAMES to EXCLUDE. If set they must be in quotes, # # The syntax is: dbname.tablename # # eg: pictdb.pictnames # #------------------------------------------------------------------------------# TBEXCLUDE="" #------------------------------------------------------------------------------# # Include CREATE DATABASE in backup? # #------------------------------------------------------------------------------# CREATE_DATABASE="yes" #------------------------------------------------------------------------------# # Include DROP DATABASE in backup? # #------------------------------------------------------------------------------# DROP_DATABASE="yes" #------------------------------------------------------------------------------# # Include DROP TABLE in backup? # #------------------------------------------------------------------------------# DROP_TABLE="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="yes" #------------------------------------------------------------------------------# # Lock the databases while backupping # #------------------------------------------------------------------------------# LOCK_TABLES="yes" #------------------------------------------------------------------------------# # Include the MySQL event tables # #------------------------------------------------------------------------------# INC_EVENTS="yes" #------------------------------------------------------------------------------# # Run MySQLcheck on the database and optimize/repair the databases # #------------------------------------------------------------------------------# RUN_CHECK="yes" CHECK_OPTIMIZE="yes" CHECK_UPGRADE="yes" CHECK_REPAIR="no" #------------------------------------------------------------------------------# # The maximum size of the buffer for client/server communication. e.g. 16MB # #------------------------------------------------------------------------------# #MAX_ALLOWED_PACKET="64MB" #------------------------------------------------------------------------------# # For connections to localhost. Sometimes the UNIX socket file must be given # #------------------------------------------------------------------------------# SOCKET="" #------------------------------------------------------------------------------# # Command to run before backups (uncomment to use) # #------------------------------------------------------------------------------# #PREBACKUP="/etc/mysql-backup-pre" #------------------------------------------------------------------------------# # Command to run after backups (uncomment to use) # #------------------------------------------------------------------------------# #POSTBACKUP="/etc/mysql-backup-post"