Permalink
Newer
Older
100644 329 lines (253 sloc) 10.7 KB
sukria
Jul 31, 2005
1
# Backup Manager Configuration File
sukria
Jul 9, 2005
2
#
sukria
Jul 31, 2005
3
# * This configuration file is divided into sections.
4
# The 'global' section is mandatory, every keys defined in
5
# this section are inherited in the other sections.
6
# * There is one section per "backup method", you have to
7
# fill the section of the chosen method.
sukria
Jul 9, 2005
8
#
9
##############################################################
10
11
##############################################################
sukria
Sep 10, 2005
12
# Repository - everything about where archives are
sukria
Jul 31, 2005
13
#############################################################
sukria
Jul 31, 2005
15
# Where to store the archives
16
export BM_REPOSITORY_ROOT="/var/archives"
sukria
Jul 31, 2005
18
# For security reasons, the archive repository and the generated
19
# archives will be readable/writable by a given user/group.
sukria
Jan 3, 2006
20
# This is recommended to set this to true.
21
export BM_REPOSITORY_SECURE="true"
sukria
Jul 31, 2005
23
# The repository will be readable/writable only by a specific
sukria
Jan 3, 2006
24
# user:group pair if BM_REPOSITORY_SECURE is set to true.
sukria
Jul 31, 2005
25
export BM_REPOSITORY_USER="root"
26
export BM_REPOSITORY_GROUP="root"
sukria
Jul 31, 2005
28
##############################################################
29
# Archives - let's focus on the precious tarballs...
30
##############################################################
sukria
Jul 31, 2005
32
# Number of days we have to keep an archive (Time To Live)
33
export BM_ARCHIVE_TTL="5"
sukria
Jul 9, 2005
35
# Do you want to replace duplicates by symlinks?
sukria
Jul 31, 2005
36
# (archive-DAY is a duplicate of archive-(DAY - 1) if they
sukria
Jul 9, 2005
37
# are both the same size).
sukria
Jan 3, 2006
38
export BM_ARCHIVE_PURGEDUPS="true"
40
# Prefix of every archive on that box (default is HOSTNAME)
sukria
Jul 31, 2005
41
export BM_ARCHIVE_PREFIX="$HOSTNAME"
42
43
# The backup method to use.
44
# Available methods are:
45
# - tarball
46
# - tarball-incremental
47
# - mysql
48
# - svn
49
# - pipe
50
# - none
51
# If you don't want to use any backup method (you don't want to
52
# build archives) then choose "none"
sukria
Jul 31, 2005
53
export BM_ARCHIVE_METHOD="tarball"
sukria
Dec 6, 2004
54
sukria
Jul 31, 2005
55
##############################################################
56
# Section "TARBALL"
57
# - Backup method: tarball
58
#############################################################
sukria
Jul 31, 2005
60
# Archive filename format
61
# long : host-full-path-to-folder.tar.gz
62
# short : parentfolder.tar.gz
63
export BM_TARBALL_NAMEFORMAT="long"
65
# Type of archives, available types are tar, tar.gz, tar.bz2, dar, zip.
sukria
Jul 31, 2005
66
export BM_TARBALL_FILETYPE="tar.gz"
sukria
Jul 31, 2005
68
# Do you want to dereference the files pointed by symlinks ?
sukria
Jan 3, 2006
69
# enter true or false (true can lead to huge archives, be careful).
70
export BM_TARBALL_DUMPSYMLINKS="false"
sukria
Jul 31, 2005
72
# Directories you want to backup as tarballs (separated by spaces)
73
export BM_TARBALL_DIRECTORIES="/etc /home"
75
# Files to exclude when generating tarballs, you can put absolute
76
# or relative paths, Bash wildcards are possible.
77
export BM_TARBALL_BLACKLIST="/dev /sys /proc /tmp"
sukria
Dec 6, 2004
78
79
# With the "dar" filetype, you can choose a maximum slice limit.
80
export BM_TARBALL_SLICESIZE="1000M"
81
82
##############################################################
83
# The tarball-incremental method uses the same keys as the
84
# tarball method, plus two others.
85
#############################################################
87
# Which frequency to use for the master tarball?
88
# possible values: weekly, monthly
89
export BM_TARBALLINC_MASTERDATETYPE="weekly"
91
# Number of the day, in the BM_TARBALLINC_MASTERDATETYPE frequency
92
# when master tarballs should be made
93
export BM_TARBALLINC_MASTERDATEVALUE="1"
95
# Examples: you want to make maser tarballs every friday:
96
# BM_TARBALLINC_MASTERDATETYPE="weekly"
97
# BM_TARBALLINC_MASTERDATEVALUE="5"
98
#
99
# Or every first day of the month:
100
# BM_TARBALLINC_MASTERDATETYPE="monthly"
101
# BM_TARBALLINC_MASTERDATEVALUE="1"
102
sukria
Jul 31, 2005
103
##############################################################
sukria
Sep 10, 2005
104
# Backup method: MYSQl
sukria
Jul 31, 2005
105
#############################################################
107
# This method is dedicated to MySQL databases.
108
# You should not use the tarball method for backing up database
sukria
Sep 10, 2005
109
# directories or you may have corrupted archives.
110
# Enter here the list of databases to backup.
111
# Wildcard: __ALL__ (will dump all the databases in one archive)
112
export BM_MYSQL_DATABASES="__ALL__"
113
114
# The best way to produce MySQL dump is done by using the "--opt" switch
115
# of mysqldump. This make the dump directly usable with mysql (add the drop table
116
# statements), lock the tables during the dump and other things.
117
# This is recommended for full-clean-safe backups, but needs a
118
# privileged user (for the lock permissions).
119
export BM_MYSQL_SAFEDUMPS="true"
120
sukria
Sep 10, 2005
121
# The user who is allowed to read every databases filled in BM_MYSQL_DATABASES
122
export BM_MYSQL_ADMINLOGIN="root"
sukria
Sep 10, 2005
124
# its password
125
export BM_MYSQL_ADMINPASS=""
127
# the host where the database is
sukria
Sep 10, 2005
128
export BM_MYSQL_HOST="localhost"
sukria
Sep 10, 2005
130
# the port where MySQL listen to on the host
131
export BM_MYSQL_PORT="3306"
sukria
Sep 10, 2005
133
# which compression format to use? (gzip or bzip2)
134
export BM_MYSQL_FILETYPE="bzip2"
135
136
##############################################################
137
# Backup method: svn
138
#############################################################
140
# Absolute paths to the svn repositories to archive
141
export BM_SVN_REPOSITORIES=""
143
# You can compress the resulting XML files
144
# Supported compressor are: bzip2 and gzip
145
export BM_SVN_COMPRESSWITH="bzip2"
146
sukria
Jul 31, 2005
147
##############################################################
148
# Backup method: pipe
149
#############################################################
151
# The "pipe" method is a generic way of making archive.
152
# Its concept is simple, for every kind of archive you want
153
# to make, you give: a command which will send output on stdout,
154
# a name, a file type and optionnaly, a compressor.
155
156
# Be careful, this feature uses arrays!
157
declare -a BM_PIPE_COMMAND
158
declare -a BM_PIPE_NAME
159
declare -a BM_PIPE_FILETYPE
160
declare -a BM_PIPE_COMPRESS
161
162
# You can virtually implement whatever backup scenario you like
163
# with this method.
164
#
165
# The resulting archives will be named like this:
166
# $BM_ARCHIVE_PREFIX-$BM_PIPE_NAME.$DATE.$BM_PIPE_FILETYPE
167
# If you specified a BM_PIPE_COMPRESS option, the resulting filename
168
# will change as expected (eg, .gz if "gzip").
169
#
170
# Here are a couple of examples for using this method:
171
172
# Archive a remote MySQL database through SSH:
173
# BM_PIPE_COMMAND[0]="ssh host -c \"mysqldump -ufoo -pbar base\""
174
# BM_PIPE_NAME[0]="base"
175
# BM_PIPE_FILETYPE[0]="sql"
176
# BM_PIPE_COMPRESS[0]="gzip"
177
# This will make somthing like: localhost-base.20050421.sql.gz
178
179
# Archive a specific directory, on a remote server through SSH:
180
# BM_PIPE_COMMAND[0]="ssh host -c \"tar -c -z /home/user\""
181
# BM_PIPE_NAME[0]="host.home.user"
182
# BM_PIPE_FILETYPE[0]="tar.gz"
183
# BM_PIPE_COMPRESS[0]=""
184
# This will make somthing like: localhost-host.home.user.20050421.tar.gz
sukria
Sep 10, 2005
185
186
export BM_PIPE_COMMAND
187
export BM_PIPE_NAME
188
export BM_PIPE_FILETYPE
189
export BM_PIPE_COMPRESS
sukria
Sep 10, 2005
190
sukria
Dec 6, 2004
191
##############################################################
sukria
Jul 31, 2005
192
# Section "UPLOAD"
193
# You can upload archives to remote hosts with different
194
# methods.
sukria
Dec 6, 2004
195
#############################################################
197
# Which method to use for uploading archives, you can put
198
# multiple methods here.
199
# Available methods:
200
# - scp
201
# - ftp
202
# - rsync
203
# - none
205
# If you don't want to use any upload method (you don't want to
206
# upload files to remote hosts) then choose "none"
207
export BM_UPLOAD_METHOD=""
209
# where to upload (global to all methods)
sukria
Jul 31, 2005
210
export BM_UPLOAD_HOSTS=""
212
# Where to put archives on the remote hosts (global)
213
export BM_UPLOAD_DESTINATION=""
sukria
Dec 6, 2004
214
215
##############################################################
216
# The SSH method
217
#############################################################
219
# the user to use for the SSH connections/transfers
220
export BM_UPLOAD_SSH_USER=""
222
# The private key to use for opening the connection
223
export BM_UPLOAD_SSH_KEY=""
225
# specific ssh hosts
226
export BM_UPLOAD_SSH_HOSTS=""
228
# port to use for SSH connections (leave blank for default one)
229
export BM_UPLOAD_SSH_PORT=""
231
# destination for ssh uploads (overrides BM_UPLOAD_DESTINATION)
232
export BM_UPLOAD_SSH_DESTINATION=""
234
##############################################################
235
# The FTP method
236
#############################################################
238
# the user to use for the FTP connections/transfers
239
export BM_UPLOAD_FTP_USER=""
241
# the FTP user's password
242
export BM_UPLOAD_FTP_PASSWORD=""
244
# FTP specific remote hosts
245
export BM_UPLOAD_FTP_HOSTS=""
247
# purge archives on remote hosts before uploading?
sukria
Jan 3, 2006
248
export BM_UPLOAD_FTP_PURGE="false"
250
# destination for FTP uploads (overrides BM_UPLOAD_DESTINATION)
251
export BM_UPLOAD_FTP_DESTINATION=""
sukria
Dec 6, 2004
252
253
254
##############################################################
255
# The RSYNC method
256
#############################################################
257
258
# Which directories should be backuped with rsync
259
export BM_UPLOAD_RSYNC_DIRECTORIES=""
261
# Destination for rsync uploads (overrides BM_UPLOAD_DESTINATION)
262
export BM_UPLOAD_RSYNC_DESTINATION=""
263
264
# The list of remote hosts, if you want to enable the upload
265
# system, just put some remote hosts here (fqdn or IPs)
266
# Leave it empty if you want to use the hosts that are defined in
267
# BM_UPLOAD_HOSTS
268
export BM_UPLOAD_RSYNC_HOSTS=""
269
270
# Do you want to dereference the files pointed by symlinks?
sukria
Jan 3, 2006
271
# enter true or false (true can lead to huge archives, be careful).
272
export BM_UPLOAD_RSYNC_DUMPSYMLINKS="false"
sukria
Dec 6, 2004
274
##############################################################
sukria
Jul 31, 2005
275
# Section "BURNING"
276
# - Automatic CDR/CDRW/DVDR burning
sukria
Dec 6, 2004
277
#############################################################
278
279
# the method of burning archives from the list :
280
# - DVD : burn archives on a DVD media.
281
#
282
# - CDRW : blank the CDRW and burn the whole
283
# ARCHIVES_REPOSITORY or only
284
# the generated archives.
285
#
286
# - CDR : burn the whole ARCHIVES_REPOSITORY or
287
# only the generated archives.
288
# - none : disable the burning system
289
290
export BM_BURNING_METHOD="none"
sukria
Dec 6, 2004
291
sukria
Jul 9, 2005
292
# When the CD is burnt, it is possible to check every file's
293
# MD5 checksum to see if the CD is not corrupted.
294
export BM_BURNING_CHKMD5="false"
sukria
Dec 6, 2004
295
sukria
Jul 9, 2005
296
# The device to use for mounting the cdrom
sukria
Dec 6, 2004
297
export BM_BURNING_DEVICE="/dev/cdrom"
298
sukria
Jul 9, 2005
299
# You can force cdrecord to use a specific device
300
# Fill in the full path to the device to use or even
301
# e.g. BM_BURNING_DEVFORCED="/dev/cdrom"
302
# If none specified, the default cdrecord device will be used.
303
export BM_BURNING_DEVFORCED=""
305
# enter here the max size of your media
306
# (usal sizes are 4200 for DVD media and 700 or 800 for CDR media)
307
export BM_BURNING_MAXSIZE="650"
sukria
Dec 6, 2004
308
309
310
##############################################################
311
# Advanced settings, use this with care.
312
#############################################################
313
314
# Every output made can be sent to syslog
sukria
Jan 3, 2006
315
# set this to "true" or "false"
316
export BM_LOGGER="true"
317
318
# You can choose which facility to use
319
export BM_LOGGER_FACILITY="user"
320
sukria
Dec 6, 2004
321
# Enter here some shell script.
322
# It will be executed before the first action of backup-manager.
323
export BM_PRE_BACKUP_COMMAND=""
324
325
# Enter here some shell script.
326
# It will be executed after the last action of backup-manager.
327
export BM_POST_BACKUP_COMMAND=""
328