-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathsettings.conf
More file actions
132 lines (96 loc) · 4.49 KB
/
Copy pathsettings.conf
File metadata and controls
132 lines (96 loc) · 4.49 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
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
##########################################################################
###
### Author: Rahul Kumar
### Email: rahul@tecadmin.net
### Website: https://tecadmin.net
### Webpage: https://tecadmin.net/advance-bash-script-for-mysql-database-backup/
### Version 4.0
###
### The script backup configuration file. Update all
### Sections of this configuration, as per your need to
### run database backups on your server.
###
##########################################################################
#VERBOSE mode 0=disable, 1=enable
VERBOSE=1
##########################################################################
### MYSQL Database Server Details
##########################################################################
MYSQL_HOST="localhost"
MYSQL_PORT="3306"
## Update your mysql credetials in below file
CREDENTIAL_FILE="/etc/mydumpadmin/credentials.txt"
##########################################################################
### MYSQL Dump Params
##########################################################################
MYDUMP_PARAM="--single-transaction --compact"
#MYDUMP_PARAM="--complete-insert --extended-insert --create-options --disable-keys --hex-blob --order-by-primary --set-gtid-purged=OFF --single-transaction --quick --no-set-names --routines --events --triggers"
##########################################################################
### Local Database Backup Path
##########################################################################
LOCAL_BACKUP_DIR=/backup/dbbackup
TMP_PATH=/tmp
LOG_PATH=/var/log/mydumpadmin
##########################################################################
### MySQL Databases Names to Backup
##########################################################################
# Type ALL or specifiy space seprated names. Use one of below settings
DB_NAMES="ALL" ### Backup all user databases
#DB_NAMES="mydb testdb dbname2" ### Backup specified databases only
##########################################################################
### MySQL Databases Backup Retention Policy
##########################################################################
# Choose number of days, you need to keep local backup copy
BACKUP_RETAIN_DAYS=5
##########################################################################
### Enable FTP Backup
##########################################################################
FTP_ENABLE=0 # 0=disable, 1=enable
FTP_SERVER="ftp.tecadmin.net"
FTP_USERNAME="ftp username"
FTP_PASSWORD="secret password"
FTP_UPLOAD_DIR="/backup/dbbackup/"
##########################################################################
### Enable SFTP Backup
##########################################################################
SFTP_ENABLE=0 # 0=disable, 1=enable
SFTP_HOST="sftp.tecadmin.net"
SFTP_USERNAME="sftp/ssh username"
SFTP_PORT="22"
SFTP_UPLOAD_DIR="/backup/dbbackup/"
SCP="/usr/bin/scp"
##########################################################################
### Enable Amazon S3 Backup
##########################################################################
S3_ENABLE=0 # 0=disable, 1=enable
AWS_ACCESS_KEY=""
AWS_SECRET_ACCESS_KEY=""
S3_BUCKET_NAME="mybucketname"
S3_UPLOAD_LOCATION="dbbackup/daily" ## Do not use start and end slash
S3CMD="/usr/local/bin/s3cmd"
##########################################################################
### Enable MegaCmd Backup (mega.nz)
### source and docs: https://github.com/meganz/MEGAcmd
### download: https://mega.io/cmd#downloadapps
##########################################################################
MEGA_ENABLE=0 # 0=disable, 1=enable
MEGA_PATH="/Backup"
MEGA_USER=""
MEGA_PASS=""
MEGA="/usr/bin/mega-version"
##########################################################################
### Local Executables Path
##########################################################################
GZIP="/bin/gzip"
MYSQL="/usr/bin/mysql"
MYSQLDUMP="/usr/bin/mysqldump"
RM="/bin/rm"
MKDIR="/bin/mkdir"
MYSQLADMIN="/usr/bin/mysqladmin"
GREP="/bin/grep"
##########################################################################
### Enable Email Alerts
##########################################################################
#SENDEMAIL= ( 0 for not to send email, 1 for send email )
SENDEMAIL=0
EMAILTO='example@example.com'