PageRenderTime 137ms CodeModel.GetById 129ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/backup-manager.conf.tpl

http://github.com/sukria/Backup-Manager
Smarty Template | 573 lines | 445 code | 128 blank | 0 comment | 47 complexity | faf6c65b73aafe13eaef62a4f8ea43fb MD5 | raw file
  1#  Backup Manager Configuration File
  2#
  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.
  8#
  9##############################################################
 10
 11##############################################################
 12# Repository - everything about where archives are
 13#############################################################
 14
 15# Where to store the archives
 16export BM_REPOSITORY_ROOT="/var/archives"
 17
 18# Where to place temporary files
 19export BM_TEMP_DIR="/tmp"
 20
 21# For security reasons, the archive repository and the generated 
 22# archives will be readable/writable by a given user/group.
 23# This is recommended to set this to true.
 24export BM_REPOSITORY_SECURE="true"
 25
 26# The repository will be readable/writable only by a specific 
 27# user:group pair if BM_REPOSITORY_SECURE is set to true.
 28export BM_REPOSITORY_USER="root"
 29export BM_REPOSITORY_GROUP="root"
 30# You can also choose the permission to set the repository, default 
 31# is 770, pay attention to what you do there!
 32export BM_REPOSITORY_CHMOD="770"
 33
 34##############################################################
 35# Archives - let's focus on the precious tarballs...
 36##############################################################
 37
 38# Each archive generated will be chmoded for security reasons
 39# (BM_REPOSITORY_SECURE should be enabled for this).
 40export BM_ARCHIVE_CHMOD="660"
 41
 42# Number of days we have to keep an archive (Time To Live)
 43export BM_ARCHIVE_TTL="5"
 44
 45# At which frequency will you build your archives?
 46# You can choose either "daily" or "hourly". 
 47# This should match your CRON configuration.
 48export BM_ARCHIVE_FREQUENCY="daily"
 49
 50# Do you want to purge only the top-level directory or all
 51# directories under BM_REPOSITORY_ROOT?
 52export BM_REPOSITORY_RECURSIVEPURGE="false"
 53
 54# Do you want to replace duplicates by symlinks? 
 55# (archive-DAY is a duplicate of archive-(DAY - 1) if they 
 56# are both the same according to MD5 hashes).
 57export BM_ARCHIVE_PURGEDUPS="true"
 58
 59# Prefix of every archive on that box (default is HOSTNAME)
 60export BM_ARCHIVE_PREFIX="$HOSTNAME"
 61
 62# Should we purge only archives built with $BM_ARCHIVE_PREFIX
 63export BM_ARCHIVE_STRICTPURGE="true"
 64
 65# You may want to nice the commands run for archive-creation
 66# (Recommanded for desktop users.)
 67# Choose a nice level from -20 (most favorable scheduling) to 19 (least favorable).
 68export BM_ARCHIVE_NICE_LEVEL="10"
 69
 70# The backup method to use.
 71# Available methods are:
 72# - tarball
 73# - tarball-incremental
 74# - mysql
 75# - pgsql
 76# - svn
 77# - pipe
 78# - none
 79# If you don't want to use any backup method (you don't want to
 80# build archives) then choose "none"
 81export BM_ARCHIVE_METHOD="tarball"
 82
 83##############################################################
 84# Encryption - because you cannot trust the place your 
 85#              archives are
 86##############################################################
 87
 88# If you want to encrypt your archives locally, Backup Manager 
 89# can use GPG while building the archive (so the archive is never
 90# written to the disk without being encrypted.
 91
 92# Note: this feature is only possible with the following archive types:
 93# tar, tar.gz, tar.bz2
 94
 95# Uncomment the following line if you want to enable encryption
 96# export BM_ENCRYPTION_METHOD="gpg"
 97
 98# The encryption will be made using a GPG ID
 99# Examples:
100# export BM_ENCRYPTION_RECIPIENT="0x1EE5DD34"
101# export BM_ENCRYPTION_RECIPIENT="Alexis Sukrieh"
102# export BM_ENCRYPTION_RECIPIENT="sukria@sukria.net"
103
104
105##############################################################
106# Section "TARBALL"
107# - Backup method: tarball
108#############################################################
109
110# Archive filename format
111# 	long  : host-full-path-to-folder.tar.gz
112# 	short : parentfolder.tar.gz
113export BM_TARBALL_NAMEFORMAT="long"
114
115# Type of archives
116# Available types are:
117#     tar, tar.gz, tar.bz2, tar.xz, tar.lzma, dar, zip.
118# Make sure to satisfy the appropriate dependencies 
119# (bzip2, dar, xz, lzma, ...).
120export BM_TARBALL_FILETYPE="tar.gz"
121
122# You can choose to build archives remotely over SSH.
123# You will then need to fill the BM_UPLOAD_SSH variables 
124# (BM_UPLOAD_SSH_HOSTS, BM_UPLOAD_SSH_USER, BM_UPLOAD_SSH_KEY).
125# If this boolean is set to true, archive will be saved locally (in 
126# BM_REPOSITORY_ROOT but will be built by the remote host).
127# Thus, BM_TARBALL_DIRECTORIES will be used to backup remote directories.
128# Those archive will be prefixed with the remote host name.
129export BM_TARBALL_OVER_SSH="false"
130
131# Do you want to dereference the files pointed by symlinks ? 
132# enter true or false (true can lead to huge archives, be careful).
133export BM_TARBALL_DUMPSYMLINKS="false"
134
135# Targets to backup
136
137# You can use two different variables for defining the targets of 
138# your backups, either a simple space-separated list (BM_TARBALL_DIRECTORIES)
139# or an array (BM_TARBALL_TARGETS[]).
140# Use the first one for simple path that doesn't contain spaces in their name.
141# Use the former if you want to specify paths to backups with spaces.
142
143# It's recommanded to use BM_TARBALL_TARGETS[] though.
144# Warning! You *must not* use both variables at the same time.
145
146# Paths without spaces in their name:
147# export BM_TARBALL_DIRECTORIES="/etc /boot"
148
149# If one or more of the targets contain a space, use the array:
150declare -a BM_TARBALL_TARGETS
151
152BM_TARBALL_TARGETS[0]="/etc" 
153BM_TARBALL_TARGETS[1]="/boot"
154
155export BM_TARBALL_TARGETS
156
157# Files to exclude when generating tarballs, you can put absolute 
158# or relative paths, Bash wildcards are possible.
159export BM_TARBALL_BLACKLIST="/dev /sys /proc /tmp"
160
161# With the "dar" filetype, you can choose a maximum slice limit.
162export BM_TARBALL_SLICESIZE="1000M"
163
164# Extra options to append to the tarball generation 
165# (take care to what you do; this will be silently added to the 
166# command line.)
167export BM_TARBALL_EXTRA_OPTIONS=""
168
169##############################################################
170# The tarball-incremental method uses the same keys as the 
171# tarball method, plus two others.
172#############################################################
173
174# Which frequency to use for the master tarball?
175# possible values: weekly, monthly
176export BM_TARBALLINC_MASTERDATETYPE="weekly"
177
178# Number of the day, in the BM_TARBALLINC_MASTERDATETYPE frequency
179# when master tarballs should be made
180export BM_TARBALLINC_MASTERDATEVALUE="1"
181
182# Examples: you want to make master tarballs every friday:
183# BM_TARBALLINC_MASTERDATETYPE="weekly"
184# BM_TARBALLINC_MASTERDATEVALUE="5"
185#
186# Or every first day of the month:
187# BM_TARBALLINC_MASTERDATETYPE="monthly"
188# BM_TARBALLINC_MASTERDATEVALUE="1"
189
190##############################################################
191# Backup method: MYSQL
192#############################################################
193
194# This method is dedicated to MySQL databases.
195# You should not use the tarball method for backing up database
196# directories or you may have corrupted archives.
197# Enter here the list of databases to backup.
198# Wildcard: __ALL__ (will dump all the databases in one archive)
199export BM_MYSQL_DATABASES="__ALL__"
200
201# The best way to produce MySQL dump is done by using the "--opt" switch 
202# of mysqldump. This make the dump directly usable with mysql (add the drop table
203# statements), lock the tables during the dump and other things.
204# This is recommended for full-clean-safe backups, but needs a 
205# privileged user (for the lock permissions).
206export BM_MYSQL_SAFEDUMPS="true"
207
208# The user who is allowed to read every databases filled in BM_MYSQL_DATABASES
209export BM_MYSQL_ADMINLOGIN="root"
210
211# its password
212export BM_MYSQL_ADMINPASS=""
213
214# the host where the database is
215export BM_MYSQL_HOST="localhost"
216
217# the port where MySQL listen to on the host
218export BM_MYSQL_PORT="3306"
219
220# which compression format to use? (gzip or bzip2)
221export BM_MYSQL_FILETYPE="bzip2"
222
223# Extra options to append to mysqldump
224# (take care to what you do; this will be silently added to the 
225# command line.)
226export BM_MYSQL_EXTRA_OPTIONS=""
227
228# Make separate backups of each database?
229export BM_MYSQL_SEPARATELY="true"
230
231# Specify DBs to exclude here (separated by space) 
232export BM_MYSQL_DBEXCLUDE=""
233
234##############################################################
235# Backup method: PostgreSQL
236#############################################################
237
238# This method is dedicated to PostgreSQL databases.
239# You should not use the tarball method for backing up database
240# directories or you may have corrupted archives.
241# Enter here the list of databases to backup.
242# Wildcard: __ALL__ (will dump all the databases in one archive)
243export BM_PGSQL_DATABASES="__ALL__"
244
245# The user who is allowed to read every databases filled in BM_PGSQL_DATABASES
246export BM_PGSQL_ADMINLOGIN="root"
247
248# its password
249export BM_PGSQL_ADMINPASS=""
250
251# the host where the database is
252export BM_PGSQL_HOST="localhost"
253
254# the port where PostgreSQL listen to on the host
255export BM_PGSQL_PORT="5432"
256
257# which compression format to use? (gzip or bzip2)
258export BM_PGSQL_FILETYPE="bzip2"
259
260# Extra options to append to pg_dump
261# (take care to what you do; this will be silently added to the 
262# command line.)
263export BM_PGSQL_EXTRA_OPTIONS=""
264
265##############################################################
266# Backup method: svn
267#############################################################
268
269# Absolute paths to the svn repositories to archive
270export BM_SVN_REPOSITORIES=""
271
272# You can compress the resulting XML files 
273# Supported compressor are: bzip2 and gzip
274export BM_SVN_COMPRESSWITH="bzip2"
275
276##############################################################
277# Backup method: pipe
278#############################################################
279
280# The "pipe" method is a generic way of making archive.
281# Its concept is simple, for every kind of archive you want
282# to make, you give: a command which will send output on stdout,
283# a name, a file type and optionnaly, a compressor. 
284
285# Be careful, this feature uses arrays!
286declare -a BM_PIPE_COMMAND
287declare -a BM_PIPE_NAME
288declare -a BM_PIPE_FILETYPE
289declare -a BM_PIPE_COMPRESS
290
291# You can virtually implement whatever backup scenario you like 
292# with this method.
293#
294# The resulting archives will be named like this: 
295# $BM_ARCHIVE_PREFIX-$BM_PIPE_NAME.$DATE.$BM_PIPE_FILETYPE
296# If you specified a BM_PIPE_COMPRESS option, the resulting filename 
297# will change as expected (eg, .gz if "gzip").
298#
299# Here are a couple of examples for using this method:
300
301# Archive a remote MySQL database through SSH:
302#    BM_PIPE_COMMAND[0]="ssh host -c \"mysqldump -ufoo -pbar base\"" 
303#    BM_PIPE_NAME[0]="base" 
304#    BM_PIPE_FILETYPE[0]="sql"
305#    BM_PIPE_COMPRESS[0]="gzip"
306# This will make somthing like: localhost-base.20050421.sql.gz
307
308# Archive a specific directory, on a remote server through SSH:
309#    BM_PIPE_COMMAND[0]="ssh host -c \"tar -c -z /home/user\"" 
310#    BM_PIPE_NAME[0]="host.home.user" 
311#    BM_PIPE_FILETYPE[0]="tar.gz"
312#    BM_PIPE_COMPRESS[0]=""
313# This will make somthing like: localhost-host.home.user.20050421.tar.gz
314
315export BM_PIPE_COMMAND
316export BM_PIPE_NAME
317export BM_PIPE_FILETYPE
318export BM_PIPE_COMPRESS
319
320##############################################################
321# Section "UPLOAD"
322# You can upload archives to remote hosts with different 
323# methods.
324#############################################################
325
326# Which method to use for uploading archives, you can put 
327# multiple methods here.
328# Available methods:
329# - scp
330# - ssh-gpg
331# - ftp
332# - rsync
333# - s3
334# - none
335
336# If you don't want to use any upload method (you don't want to
337# upload files to remote hosts) then choose "none"
338export BM_UPLOAD_METHOD=""
339
340# where to upload (global to all methods. Not required to be set for S3)
341export BM_UPLOAD_HOSTS=""
342
343# Where to put archives on the remote hosts (global)
344export BM_UPLOAD_DESTINATION=""
345
346# Uncomment the 'export ...' line below to activate the uploaded archives
347# database.
348# Using the database will avoid extraneous uploads to remote hosts in the
349# case of running more than one backup-manager jobs per day (such as when
350# you are using different configuration files for different parts of your
351# filesystem).
352# Note that when you upload to multiple hosts, a single succesfull upload
353# will mark the archive as uploaded. Thus upload errors to specific hosts
354# will have to be resolved manually.
355# You can specify any filename, but it is recommended to keep the database
356# inside the archive repository. The variable's value has been preset to
357# that.
358#export BM_UPLOADED_ARCHIVES=${BM_REPOSITORY_ROOT}/${BM_ARCHIVE_PREFIX}-uploaded.list
359
360##############################################################
361# The SSH method
362#############################################################
363
364# the user to use for the SSH connections/transfers
365export BM_UPLOAD_SSH_USER=""
366
367# The private key to use for opening the connection
368export BM_UPLOAD_SSH_KEY=""
369
370# specific ssh hosts 
371export BM_UPLOAD_SSH_HOSTS=""
372
373# port to use for SSH connections (leave blank for default one)
374export BM_UPLOAD_SSH_PORT=""
375
376# destination for ssh uploads (overrides BM_UPLOAD_DESTINATION)
377export BM_UPLOAD_SSH_DESTINATION=""
378
379# purge archives on remote hosts before uploading?
380export BM_UPLOAD_SSH_PURGE="true"
381
382# If you set BM_UPLOAD_SSH_PURGE, you can specify a time to live 
383# for archives uploaded with SSH.
384# This can let you use different ttl's locally and remotely
385# By default, BM_ARCHIVE_TTL will be used.
386export BM_UPLOAD_SSH_TTL=""
387
388##############################################################
389# The SSH-GPG method
390# The ssh-gpg method uses the same configuration keys as the 
391# ssh method, plus one other
392#############################################################
393
394# The gpg public key used for encryption, this can be a short 
395# or long key id, or a descriptive name. See gpg man page for 
396# all possibilities how to specify a key.
397export BM_UPLOAD_SSHGPG_RECIPIENT=""
398
399##############################################################
400# The FTP method
401#############################################################
402
403# Use FTP secured transfers (FTP over TLS)
404# User, password and data will be uploaded encrypted with SSL.
405# Passive mode will be automaticaly activated
406export BM_UPLOAD_FTP_SECURE="false"
407
408# Do you want to use FTP passive mode?
409# This is mandatory for NATed/firewalled environments 
410export BM_UPLOAD_FTP_PASSIVE="true"
411
412# Timeout (in seconds) for FTP transfer
413# This setting only has effect when using FTP transfer with
414# secure mode disabled (BM_UPLOAD_FTP_SECURE to "false")
415export BM_UPLOAD_FTP_TIMEOUT="120"
416
417# Test the FTP connection before starting archives upload.
418# This will enable BM to try sending a 2MB test file before
419# sending any archive
420export BM_UPLOAD_FTP_TEST="false"
421
422# the user to use for the FTP connections/transfers
423export BM_UPLOAD_FTP_USER=""
424
425# the FTP user's password
426export BM_UPLOAD_FTP_PASSWORD=""
427
428# FTP specific remote hosts
429export BM_UPLOAD_FTP_HOSTS=""
430
431# purge archives on remote hosts before uploading?
432export BM_UPLOAD_FTP_PURGE="true"
433
434# You can specify a time to live for archives uploaded with FTP
435# This can let you use different ttl's locally and remotely
436# By default, BM_ARCHIVE_TTL will be used.
437export BM_UPLOAD_FTP_TTL=""
438
439# destination for FTP uploads (overrides BM_UPLOAD_DESTINATION)
440export BM_UPLOAD_FTP_DESTINATION=""
441
442
443##############################################################
444# The S3 method
445#############################################################
446
447# The Amazon S3 method requires that you secure an S3
448# account. See http://aws.amazon.com
449
450# The bucket to upload to. This bucket must be dedicated to backup-manager
451export BM_UPLOAD_S3_DESTINATION=""
452
453# the S3 access key provided to you
454export BM_UPLOAD_S3_ACCESS_KEY=""
455
456# the S3 secret key provided to you
457export BM_UPLOAD_S3_SECRET_KEY=""
458
459# purge archives on remote hosts before uploading?
460export BM_UPLOAD_S3_PURGE="false"
461
462# You can specify a time to live for archives uploaded to S3
463# This can let you use different ttl's locally and remotely
464# By default, BM_ARCHIVE_TTL will be used.
465export BM_UPLOAD_S3_TTL=""
466
467##############################################################
468# The RSYNC method
469#############################################################
470
471# Which directories should be backuped with rsync
472export BM_UPLOAD_RSYNC_DIRECTORIES=""
473
474# Destination for rsync uploads (overrides BM_UPLOAD_DESTINATION) 
475export BM_UPLOAD_RSYNC_DESTINATION=""
476
477# The list of remote hosts, if you want to enable the upload
478# system, just put some remote hosts here (fqdn or IPs)
479# Leave it empty if you want to use the hosts that are defined in
480# BM_UPLOAD_HOSTS
481export BM_UPLOAD_RSYNC_HOSTS=""
482
483# Do you want to dereference the files pointed by symlinks?   
484# enter true or false (true can lead to huge archives, be careful).    
485export BM_UPLOAD_RSYNC_DUMPSYMLINKS="false"
486
487# Files/folders to exclude when rsyncing. Warning: rsync will interpret
488# it as a mask, so will exclude any file/folder corresponding to it
489export BM_UPLOAD_RSYNC_BLACKLIST=""
490
491# Extra options to append to rsync
492# (take care to what you do; this will be silently added to the
493# command line.)
494export BM_UPLOAD_RSYNC_EXTRA_OPTIONS=""
495
496# Do you want to limit the maximum available bandwidth rsync
497# can use ?
498# By default, no bandwidth limit is applied.
499# Example: 32M, 1024K, ...
500export BM_UPLOAD_RSYNC_BANDWIDTH_LIMIT=""
501
502##############################################################
503# Section "BURNING" 
504# - Automatic CDR/CDRW/DVDR burning
505#############################################################
506
507# the method of burning archives from the list :
508#  - DVD    : burn archives on a DVD medium
509#             (that doesn't need formatting, like DVD+RW).
510#
511#  - DVD-RW : blank the DVD medium and burn archives 
512#             (recommanded for DVD-RW media).
513#
514#  - CDRW   : blank the CDRW and burn the whole 
515#             ARCHIVES_REPOSITORY or only 
516#             the generated archives.
517#
518#  - CDR    : burn the whole ARCHIVES_REPOSITORY or 
519#             only the generated archives.
520#  - none   : disable the burning system
521#
522# Note that if backup-manager is run from interactive prompt you
523# will be asked to insert disc(s) when needed
524
525export BM_BURNING_METHOD="none"
526
527# When the CD is burnt, it is possible to check every file's 
528# MD5 checksum to see if the CD is not corrupted.
529export BM_BURNING_CHKMD5="false"
530
531# The device to use for mounting the cdrom
532export BM_BURNING_DEVICE="/dev/cdrom"
533
534# You can force cdrecord to use a specific device
535# Fill in the full path to the device to use or even
536# e.g. BM_BURNING_DEVFORCED="/dev/cdrom"
537# If none specified, the default cdrecord device will be used.
538export BM_BURNING_DEVFORCED=""
539
540# By default backup-manager will make Joliet media (using the mkisofs switches
541# : "-R -J"). You can change these if you want to use non-Joliet disc images.
542# Change this only if you know what you're doing. Refer to mkisofs(8) for
543# details.
544export BM_BURNING_ISO_FLAGS="-R -J"
545
546# enter here the max size of your media 
547# (usal sizes are 4200 for DVD media and 700 or 800 for CDR media)
548export BM_BURNING_MAXSIZE="650"
549
550
551##############################################################
552# Advanced settings, use this with care.
553#############################################################
554
555# Every output made can be sent to syslog
556# set this to "true" or "false"
557export BM_LOGGER="true"
558
559# Which level of messages do you want to log to syslog?
560# possible values are : debug,info,warning,error
561export BM_LOGGER_LEVEL="warning"
562
563# You can choose which facility to use
564export BM_LOGGER_FACILITY="user"
565
566# Enter here some shell script.
567# It will be executed before the first action of backup-manager.
568export BM_PRE_BACKUP_COMMAND=""
569
570# Enter here some shell script.
571# It will be executed after the last action of backup-manager.
572export BM_POST_BACKUP_COMMAND=""
573