-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbackup_config.sample
149 lines (135 loc) · 3.24 KB
/
backup_config.sample
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
##### BACKUP DIRECTORY #####
# - Make sure that user running the script has permissions to write in the backup directory.
#
backupDir="/backup/"
#
### MAXIMUM SIZE OF THE BACKUP DIRECTORY ###
# - Specify the maximum size for the backup folder, in KB, without the denominator.
#
maxDirSize="5000000"
#
### COMPRESS BACKUP FOLDER ###
# - To compress the backup folder set "1" below, otherwise set to "0" or leave unset.
#
tarBackup="1"
#
### TEMPORARY DIRECTORY ###
# - Full path of the directory where all files will be copied to during the backup.
#
tmpDir="/tmp"
#
### EXTRA DIRECTORY ###
# - Full path to another directory where the backup will be cloned to, otherwise leave unset.
#
extraBackupDir="/mnt/archive/"
##### DIRECTORIES AND FILES TO BACKUP #####
# - To add a directory or file, just add a new line to the sourceDir array.
# - Make sure that user running the script has permissions to read the folders and files.
#
sourceDir=(
/home/user
/etc
)
##### DIRECTORIES AND FILES TO EXCLUDE FROM THE BACKUP #####
# - To exclude a directory or file, just add a new line to the rsyncExludes array.
#
rsyncExcludes=(
Cache
cache
Logs
logs
Temp
temp
Tmp
tmp
*.log*
)
##### BACKUP FILES FROM FTP #####
# - To backup files from FTP set "1" bellow, otherwise set to "0" or leave unset.
#
backupFtp="1"
#
### FTP SERVER ###
# - Address of the FTP server.
#
ftpHost=""
#
### FTP USERNAME ###
# - Username to access the FTP server.
#
ftpUser=""
#
### FTP PASSWORD ###
# - Password of the account selected previouslly.
#
ftpPass=""
#
### FTP DESTINATION FOLDER ###
# - Name of the folder in the backup archive where all the FTP files will be stored..
#
ftpDir="ftp"
##### BACKUP MYSQL DATABASES #####
# - To backup MySQL databases set "1" bellow, otherwise set to "0" or leave unset.
#
backupMysql="1"
#
### MYSQL SERVER ###
# - Address of the MySQL server to backup.
#
mysqlHost="localhost"
#
### MYSQL USERNAME ###
# - Username to acess the MySQL database.
#
mysqlUser="user"
#
### MYSQL PASSWORD ###
# - Password of the account selected previouslly.
#
mysqlPass="pass"
#
### MYSQL DATABASE ###
# - Set the name of the database to backup. To backup all set to "-A".
#
mysqlDb="db_name"
#
### SQL DESTINATION FOLDER ###
#
sqlDir="databases"
##### ROOT DIR CLONING #####
# - Full path to the directory where the root fs will be cloned to, otherwise leave unset.
#
cloneDir="/mnt/backupfs/"
#
### Mountpoints to mount before clonning the root fs. Will be umounted after post cloning script is done
cloneDirMounts=(
11111111-2222-3333-4444-555555555555,/mnt/backupfs,ext4,noatime
66666666-7777-8888-9999-000000000000,/mnt/backupfs/boot,ext4,noatime
AAAA-BBBB,/mnt/backupfs/boot/efi,vfat
)
#
### POST CLONING SCRIPT
# - Script to run after cloning the root filesystem
#
cloneDirScript="/opt/scripts/clonedir_installer.sh"
##### PLAIN TEXT LOG #####
# - Set to "1" to create a log file without colors, otherwise set to "0" or leave unset.
#
plainLog="1"
##### EXTRA COMMANDS #####
# - Output files will be stored in the root dir of the backup. Do not remove the last echo.
#
extra_commands ()
{
uname -r >example.txt
echo "" >/dev/null
}
#
### EXTRA INFO ###
# - Extra information to include in the header on backup start. Do not remove the last echo.
#
extra_info ()
{
echo "Example: $(uname -r)"
echo ""
}