-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbackupmysql.conf
More file actions
73 lines (50 loc) · 1.67 KB
/
backupmysql.conf
File metadata and controls
73 lines (50 loc) · 1.67 KB
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
# your MySQL server's name
SERVER=`hostname -f`
# directory to backup to
BACKDIR=~/backups/mysql
# date format that is appended to filename
DATE=`date +'%m-%d-%Y-%H%M'`
#----------------------MySQL Settings--------------------#
# your MySQL server's location (IP address is best)
HOST=localhost
# MySQL username
USER=root
# MySQL password
PASS=password
# List all of the MySQL databases that you want to backup in here,
# each separated by a space
DBS="db1 db2"
# set to 'y' if you want to backup all your databases. this will override
# the database selection above.
DUMPALL=y
#----------------------Mail Settings--------------------#
# set to 'y' if you'd like to be emailed the backup (requires mutt)
MAIL=y
# email addresses to send backups to, separated by a space
EMAILS="address@yahoo.com address@usa.com"
SUBJECT="MySQL backup on $SERVER ($DATE)"
#----------------------FTP Settings--------------------#
# set "FTP=y" if you want to enable FTP backups
FTP=y
# FTP server settings; group each remote server using arrays
# you can have unlimited remote FTP servers
FTPHOST[0]="ftphost"
FTPUSER[0]="username"
FTPPASS[0]="password"
FTPDIR[0]="backups"
FTPHOST[1]="ftphost"
FTPUSER[1]="username"
FTPPASS[1]="password"
FTPDIR[1]="mybackups/mysql"
FTPHOST[2]="ftphost"
FTPUSER[2]="username"
FTPPASS[2]="password"
FTPDIR[2]="backups"
# directory to backup to; if it doesn't exist, file will be uploaded to
# first logged-in directory; the array indices correspond to the FTP info above
#-------------------Deletion Settings-------------------#
# delete old files?
DELETE=y
# how many days of backups do you want to keep?
DAYS=30
#----------------------End of Settings------------------#