forked from rmtsrc/mysqlbackup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmysqlbackup.sample.conf
85 lines (59 loc) · 2.06 KB
/
mysqlbackup.sample.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
# MySQL backup config file
#----------------------General Settings--------------------#
# MySQL server's name
SERVER="Servers-hostname"
# Directory to backup to
BACKDIR="/path/to/backup/folder"
#----------------------MySQL Settings--------------------#
# MySQL server's hostname or IP address
HOST="localhost"
# MySQL username
USER="username"
# MySQL password
PASS="password"
# List all of the MySQL databases that you want to backup,
# each separated by a space. Or set the option below to backup all database
DBS="db1 db2"
# Set to 'y' if you want to backup all your databases. This will override
# the database selection above.
DUMPALL="y"
# Move compressed bzip2 database dumps into a single tar file
# otherwise move them into a year-month-day folder
MOVETAR="n"
# Custom path to system commands (enable these if you want use a different
# location MySQL or if you are having problems running this script)
#MYSQL="/opt/local/bin/mysql"
#MYSQLDUMP="/opt/local/bin/mysqldump"
#----------------------Mail Settings--------------------#
# Set to 'y' if you'd like to be emailed the backup (requires mutt)
MAIL="n"
# Email addresses to send backups to, separated by a space
EMAILS="your-email@example.com"
SUBJECT="MySQL backup on $SERVER ($DATE)"
# Only email on the first day of the month
EMAILSENDON="01"
EMAILTODAY=`date +'%d'`
#----------------------FTP Settings--------------------#
# Set "FTP=y" if you want to enable FTP backups
FTP="n"
# FTP server settings; should be self-explanatory
FTPHOST="ftp.server.com"
FTPUSER="username"
FTPPASS="password"
# Directory to backup to. if it doesn't exist, file will be uploaded to
# first logged-in directory
FTPDIR="backups"
#-------------------Backup Rotation Settings-------------------#
# Rotate old files?
ROTATE="y"
# How many backups do you want to keep? (rotate setting above must be y)
MAX_DAYS=5 #default 5
MAX_WEEKS=4 #default 4
MAX_MONTHS=3 #default 3
# Paths
LATEST_PATH="latest"
ARCHIVE_PATH="archive"
DAILY_PATH="daily"
WEEKLY_PATH="weekly"
MONTHLY_PATH="monthly"
#----------------------End of Settings------------------#