-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmysqlbackup.conf
172 lines (144 loc) · 9.48 KB
/
mysqlbackup.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#------------------------------------------------------------------------------#
# 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 <github@tonkersten.com> $: #
# $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"