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