diff --git a/src/defaultconfigs/legacy/README b/src/defaultconfigs/legacy/README new file mode 100644 index 00000000000..1021981c473 --- /dev/null +++ b/src/defaultconfigs/legacy/README @@ -0,0 +1,2 @@ +These are the default configuration files inherited from the +bacula project. diff --git a/src/defaultconfigs/legacy/bareos-dir.conf.in b/src/defaultconfigs/legacy/bareos-dir.conf.in new file mode 100644 index 00000000000..d401832474a --- /dev/null +++ b/src/defaultconfigs/legacy/bareos-dir.conf.in @@ -0,0 +1,319 @@ +# +# Default Bareos Director Configuration file +# +# The only thing that MUST be changed is to add one or more +# file or directory names in the Include directive of the +# FileSet resource. +# +# For Bareos release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@ +# +# You might also want to change the default email address +# from root to your address. See the "mail" and "operator" +# directives in the Messages resource. +# + +Director { # define myself + Name = @basename@-dir + QueryFile = "@scriptdir@/query.sql" + Maximum Concurrent Jobs = 1 + Password = "@dir_password@" # Console password + Messages = Daemon + + # remove comment in next line to load plugins from specified directory + # Plugin Directory = @plugindir@ +} + +JobDefs { + Name = "DefaultJob" + Type = Backup + Level = Incremental + Client = @basename@-fd + FileSet = "Full Set" + Schedule = "WeeklyCycle" + Storage = File + Messages = Standard + Pool = File + Priority = 10 + Write Bootstrap = "@working_dir@/%c.bsr" +} + + +# +# Define the main nightly save backup job +# By default, this job will back up to disk in @archivedir@ +Job { + Name = "BackupClient1" + JobDefs = "DefaultJob" +} + +#Job { +# Name = "BackupClient2" +# Client = @basename@2-fd +# JobDefs = "DefaultJob" +#} + +# Backup the catalog database (after the nightly save) +Job { + Name = "BackupCatalog" + JobDefs = "DefaultJob" + Level = Full + FileSet="Catalog" + Schedule = "WeeklyCycleAfterBackup" + # This creates an ASCII copy of the catalog + # Arguments to make_catalog_backup.pl are: + # make_catalog_backup.pl + RunBeforeJob = "@scriptdir@/make_catalog_backup.pl MyCatalog" + # This deletes the copy of the catalog + RunAfterJob = "@scriptdir@/delete_catalog_backup" + # This sends the bootstrap via mail for disaster recovery. + # Should be sent to another system, please change recipient accordingly + Write Bootstrap = "|@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" @job_email@" + Priority = 11 # run after main backup +} + +# +# Standard Restore template, to be changed by Console program +# Only one such job is needed for all Jobs/Clients/Storage ... +# +Job { + Name = "RestoreFiles" + Type = Restore + Client=@basename@-fd + FileSet="Full Set" + Storage = File + Pool = Default + Messages = Standard + Where = /tmp/bareos-restores +} + + +# List of files to be backed up +FileSet { + Name = "Full Set" + Include { + Options { + signature = MD5 + } +# +# Put your list of files here, preceded by 'File =', one per line +# or include an external list with: +# +# File = \" -s \"Bareos: %t %e of %c %l\" %r" + operatorcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r" + mail = @job_email@ = all, !skipped + operator = @job_email@ = mount + console = all, !skipped, !saved +# +# WARNING! the following will create a file that you must cycle from +# time to time as it will grow indefinitely. However, it will +# also keep all your messages if they scroll off the console. +# + append = "@logdir@/bareos.log" = all, !skipped + catalog = all +} + + +# +# Message delivery for daemon messages (no job). +Messages { + Name = Daemon + mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r" + mail = @job_email@ = all, !skipped + console = all, !skipped, !saved + append = "@logdir@/bareos.log" = all, !skipped +} + +# Default pool definition +Pool { + Name = Default + Pool Type = Backup + Recycle = yes # Bareos can automatically recycle Volumes + AutoPrune = yes # Prune expired volumes + Volume Retention = 365 days # one year +} + +# File Pool definition +Pool { + Name = File + Pool Type = Backup + Recycle = yes # Bareos can automatically recycle Volumes + AutoPrune = yes # Prune expired volumes + Volume Retention = 365 days # one year + Maximum Volume Bytes = 50G # Limit Volume size to something reasonable + Maximum Volumes = 100 # Limit number of Volumes in Pool +} + + +# Scratch pool definition +Pool { + Name = Scratch + Pool Type = Backup +} + +# +# Restricted console used by tray-monitor to get the status of the director +# +Console { + Name = @basename@-mon + Password = "@mon_dir_password@" + CommandACL = status, .status +} diff --git a/src/defaultconfigs/legacy/bareos-sd.conf.in b/src/defaultconfigs/legacy/bareos-sd.conf.in new file mode 100644 index 00000000000..9e6d51a551a --- /dev/null +++ b/src/defaultconfigs/legacy/bareos-sd.conf.in @@ -0,0 +1,205 @@ +# +# Default Bareos Storage Daemon Configuration file +# +# For Bareos release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@ +# +# You may need to change the name of your tape drive +# on the "Archive Device" directive in the Device +# resource. If you change the Name and/or the +# "Media Type" in the Device resource, please ensure +# that dird.conf has corresponding changes. +# + +Storage { # definition of myself + Name = @basename@-sd + Maximum Concurrent Jobs = 20 + + # remove comment in next line to load plugins from specified directory + # Plugin Directory = @plugindir@ +} + +# +# List Directors who are permitted to contact Storage daemon +# +Director { + Name = @basename@-dir + Password = "@sd_password@" +} + +# +# Restricted Director, used by tray-monitor to get the +# status of the storage daemon +# +Director { + Name = @basename@-mon + Password = "@mon_sd_password@" + Monitor = yes +} + +# +# Note, for a list of additional Device templates please +# see the directory /examples/devices +# Or follow the following link: +# http://bareos.svn.sourceforge.net/viewvc/bareos/trunk/bareos/examples/devices/ +# + +# +# Devices supported by this Storage daemon +# To connect, the Director's bareos-dir.conf must have the +# same Name and MediaType. +# + +Device { + Name = FileStorage + Media Type = File + Archive Device = @archivedir@ + LabelMedia = yes; # lets Bareos label unlabeled media + Random Access = Yes; + AutomaticMount = yes; # when device opened, read it + RemovableMedia = no; + AlwaysOpen = no; +} + +# +# An autochanger device with two drives +# +#Autochanger { +# Name = Autochanger +# Device = Drive-1 +# Device = Drive-2 +# Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +# Changer Device = /dev/sg0 +#} + +#Device { +# Name = Drive-1 # +# Drive Index = 0 +# Media Type = DLT-8000 +# Archive Device = /dev/nst0 +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = yes; +# RemovableMedia = yes; +# RandomAccess = no; +# AutoChanger = yes +# # +# # Enable the Alert command only if you have the mtx package loaded +# # Note, apparently on some systems, tapeinfo resets the SCSI controller +# # thus if you turn this on, make sure it does not reset your SCSI +# # controller. I have never had any problems, and smartctl does +# # not seem to cause such problems. +# # +# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +# If you have smartctl, enable this, it has more info than tapeinfo +# Alert Command = "sh -c 'smartctl -H -l error %c'" +#} + +#Device { +# Name = Drive-2 # +# Drive Index = 1 +# Media Type = DLT-8000 +# Archive Device = /dev/nst1 +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = yes; +# RemovableMedia = yes; +# RandomAccess = no; +# AutoChanger = yes +# # Enable the Alert command only if you have the mtx package loaded +# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +# If you have smartctl, enable this, it has more info than tapeinfo +# Alert Command = "sh -c 'smartctl -H -l error %c'" +#} + +# +# A Linux or Solaris LTO-2 tape drive +# +#Device { +# Name = LTO-2 +# Media Type = LTO-2 +# Archive Device = @TAPEDRIVE@ +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = yes; +# RemovableMedia = yes; +# RandomAccess = no; +# Maximum File Size = 3GB +## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +## Changer Device = /dev/sg0 +## AutoChanger = yes +# # Enable the Alert command only if you have the mtx package loaded +## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +## If you have smartctl, enable this, it has more info than tapeinfo +## Alert Command = "sh -c 'smartctl -H -l error %c'" +#} + +# +# A Linux or Solaris LTO-3 tape drive +# +#Device { +# Name = LTO-3 +# Media Type = LTO-3 +# Archive Device = @TAPEDRIVE@ +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = yes; +# RemovableMedia = yes; +# RandomAccess = no; +# Maximum File Size = 4GB +## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +## Changer Device = /dev/sg0 +## AutoChanger = yes +# # Enable the Alert command only if you have the mtx package loaded +## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +## If you have smartctl, enable this, it has more info than tapeinfo +## Alert Command = "sh -c 'smartctl -H -l error %c'" +#} + +# +# A Linux or Solaris LTO-4 tape drive +# +#Device { +# Name = LTO-4 +# Media Type = LTO-4 +# Archive Device = @TAPEDRIVE@ +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = yes; +# RemovableMedia = yes; +# RandomAccess = no; +# Maximum File Size = 5GB +## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +## Changer Device = /dev/sg0 +## AutoChanger = yes +# # Enable the Alert command only if you have the mtx package loaded +## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +## If you have smartctl, enable this, it has more info than tapeinfo +## Alert Command = "sh -c 'smartctl -H -l error %c'" +#} + + + + +# +# A FreeBSD tape drive +# +#Device { +# Name = DDS-4 +# Description = "DDS-4 for FreeBSD" +# Media Type = DDS-4 +# Archive Device = /dev/nsa1 +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = yes +# Offline On Unmount = no +# Hardware End of Medium = no +# BSF at EOM = yes +# Backward Space Record = no +# Fast Forward Space File = no +# TWO EOF = yes +# If you have smartctl, enable this, it has more info than tapeinfo +# Alert Command = "sh -c 'smartctl -H -l error %c'" +#} + +# +# Send all messages to the Director, +# mount messages also are sent to the email address +# +Messages { + Name = Standard + director = @basename@-dir = all +} diff --git a/src/dird/bareos-dir.conf.in b/src/dird/bareos-dir.conf.in index d401832474a..47605da5582 100644 --- a/src/dird/bareos-dir.conf.in +++ b/src/dird/bareos-dir.conf.in @@ -1,21 +1,53 @@ # -# Default Bareos Director Configuration file +# Default Bareos Director configuration file for disk-only backup +# (C) 2013 Bareos GmbH & Co.KG +# +# Each configuration item has a reference number that shows +# where this property can be changed in the configuration file. +# Search for the number to find the correct line. +# +# You have to configure the following accoring to your environment: +# +# (#01)Email Address for bareos disaster recovery. +# Specify a mailaddress outside of your backupserver. +# There will be one mail per day. +# +# (#02)Email Address for bareos reports. (Mail Command) +# This mail address will recieve a report about each backup job. +# It will be sent after the backupjob is complete. +# Has to be configured twice ("Standard" and "Daemon" Message Ressources) +# +# (#03)Email Address for bareos operator. (Operator Command) +# This mail address will recieve a mail immediately when the +# bareos system needs an operator intervention. +# May be the same address as in (#02) +# +# +# This disk-only setup stores all data into @archivedir@ +# +# The preconfigured backup scheme is as follows: +# +# Full Backups are done on first Saturday at 21:00 (#04) +# Full Backups are written into the "Full" Pool (#05) +# Full Backups are kept for 365 Days (#06) +# +# Differential Backups are done on 2nd to 5th Saturday at 21:00 (#07) +# Differential Backups are written into the "Differential" Pool (#08) +# Differential Backups are kept for 90 Days (#09) +# +# Incremental Backups are done monday to friday at 21:00 (#10) +# Incremental Backups are written into the "Incremental" Pool (#11) +# Incremental Backups are kept for 30 Days (#12) +# # -# The only thing that MUST be changed is to add one or more -# file or directory names in the Include directive of the -# FileSet resource. # # For Bareos release @VERSION@ (@DATE@) -- @DISTNAME@ @DISTVER@ # -# You might also want to change the default email address -# from root to your address. See the "mail" and "operator" -# directives in the Messages resource. # - Director { # define myself Name = @basename@-dir QueryFile = "@scriptdir@/query.sql" - Maximum Concurrent Jobs = 1 + Maximum Concurrent Jobs = 10 Password = "@dir_password@" # Console password Messages = Daemon @@ -28,16 +60,18 @@ JobDefs { Type = Backup Level = Incremental Client = @basename@-fd - FileSet = "Full Set" + FileSet = "Linux All" Schedule = "WeeklyCycle" Storage = File Messages = Standard - Pool = File + Pool = Incremental Priority = 10 Write Bootstrap = "@working_dir@/%c.bsr" + Full Backup Pool = Full # write Full Backups into "Full" Pool (#05) + Differential Backup Pool = Differential # write Diff Backups into "Differential" Pool (#08) + Incremental Backup Pool = Incremental # write Incr Backups into "Incremental" Pool (#11) } - # # Define the main nightly save backup job # By default, this job will back up to disk in @archivedir@ @@ -46,28 +80,27 @@ Job { JobDefs = "DefaultJob" } -#Job { -# Name = "BackupClient2" -# Client = @basename@2-fd -# JobDefs = "DefaultJob" -#} - +# # Backup the catalog database (after the nightly save) +# Job { Name = "BackupCatalog" JobDefs = "DefaultJob" Level = Full FileSet="Catalog" Schedule = "WeeklyCycleAfterBackup" + # This creates an ASCII copy of the catalog # Arguments to make_catalog_backup.pl are: # make_catalog_backup.pl RunBeforeJob = "@scriptdir@/make_catalog_backup.pl MyCatalog" + # This deletes the copy of the catalog RunAfterJob = "@scriptdir@/delete_catalog_backup" + # This sends the bootstrap via mail for disaster recovery. # Should be sent to another system, please change recipient accordingly - Write Bootstrap = "|@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" @job_email@" + Write Bootstrap = "|@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" @job_email@" # (#01) Priority = 11 # run after main backup } @@ -79,52 +112,14 @@ Job { Name = "RestoreFiles" Type = Restore Client=@basename@-fd - FileSet="Full Set" + FileSet = "Linux All" Storage = File - Pool = Default + Pool = Incremental Messages = Standard Where = /tmp/bareos-restores } -# List of files to be backed up -FileSet { - Name = "Full Set" - Include { - Options { - signature = MD5 - } -# -# Put your list of files here, preceded by 'File =', one per line -# or include an external list with: -# -# File = \" -s \"Bareos: %t %e of %c %l\" %r" operatorcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r" - mail = @job_email@ = all, !skipped - operator = @job_email@ = mount + mail = @job_email@ = all, !skipped # (#02) + operator = @job_email@ = mount # (#03) console = all, !skipped, !saved -# -# WARNING! the following will create a file that you must cycle from -# time to time as it will grow indefinitely. However, it will -# also keep all your messages if they scroll off the console. -# append = "@logdir@/bareos.log" = all, !skipped catalog = all } - # # Message delivery for daemon messages (no job). +# Messages { Name = Daemon mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -s \"Bareos daemon message\" %r" - mail = @job_email@ = all, !skipped + mail = @job_email@ = all, !skipped # (#02) console = all, !skipped, !saved append = "@logdir@/bareos.log" = all, !skipped } -# Default pool definition + +# +# Full Pool definition +# Pool { - Name = Default + Name = Full Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes - Volume Retention = 365 days # one year + Volume Retention = 365 days # How long should the Full Backups be kept? (#06) + Maximum Volume Bytes = 50G # Limit Volume size to something reasonable + Maximum Volumes = 100 # Limit number of Volumes in Pool + Label Format = "Full-" # Volumes will be labeled "Full-" } -# File Pool definition +# +# Differential Pool definition +# Pool { - Name = File + Name = Differential Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes - Volume Retention = 365 days # one year - Maximum Volume Bytes = 50G # Limit Volume size to something reasonable + Volume Retention = 90 days # How long should the Differential Backups be kept? (#09) + Maximum Volume Bytes = 10G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool + Label Format = "Differential-" # Volumes will be labeled "Differential-" } +# +# Incremental Pool definition +# +Pool { + Name = Incremental + Pool Type = Backup + Recycle = yes # Bareos can automatically recycle Volumes + AutoPrune = yes # Prune expired volumes + Volume Retention = 30 days # How long should the Incremental Backups be kept? (#12) + Maximum Volume Bytes = 1G # Limit Volume size to something reasonable + Maximum Volumes = 100 # Limit number of Volumes in Pool + Label Format = "Incremental-" # Volumes will be labeled "Incremental-" +} +# # Scratch pool definition +# Pool { Name = Scratch Pool Type = Backup diff --git a/src/stored/bareos-sd.conf.in b/src/stored/bareos-sd.conf.in index 9e6d51a551a..36a78f5f98a 100644 --- a/src/stored/bareos-sd.conf.in +++ b/src/stored/bareos-sd.conf.in @@ -36,19 +36,10 @@ Director { Monitor = yes } -# -# Note, for a list of additional Device templates please -# see the directory /examples/devices -# Or follow the following link: -# http://bareos.svn.sourceforge.net/viewvc/bareos/trunk/bareos/examples/devices/ -# - # # Devices supported by this Storage daemon -# To connect, the Director's bareos-dir.conf must have the -# same Name and MediaType. +# To connect, the Director's bareos-dir.conf must have the same Name and MediaType. # - Device { Name = FileStorage Media Type = File @@ -60,141 +51,6 @@ Device { AlwaysOpen = no; } -# -# An autochanger device with two drives -# -#Autochanger { -# Name = Autochanger -# Device = Drive-1 -# Device = Drive-2 -# Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" -# Changer Device = /dev/sg0 -#} - -#Device { -# Name = Drive-1 # -# Drive Index = 0 -# Media Type = DLT-8000 -# Archive Device = /dev/nst0 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -# AutoChanger = yes -# # -# # Enable the Alert command only if you have the mtx package loaded -# # Note, apparently on some systems, tapeinfo resets the SCSI controller -# # thus if you turn this on, make sure it does not reset your SCSI -# # controller. I have never had any problems, and smartctl does -# # not seem to cause such problems. -# # -# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" -# If you have smartctl, enable this, it has more info than tapeinfo -# Alert Command = "sh -c 'smartctl -H -l error %c'" -#} - -#Device { -# Name = Drive-2 # -# Drive Index = 1 -# Media Type = DLT-8000 -# Archive Device = /dev/nst1 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -# AutoChanger = yes -# # Enable the Alert command only if you have the mtx package loaded -# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" -# If you have smartctl, enable this, it has more info than tapeinfo -# Alert Command = "sh -c 'smartctl -H -l error %c'" -#} - -# -# A Linux or Solaris LTO-2 tape drive -# -#Device { -# Name = LTO-2 -# Media Type = LTO-2 -# Archive Device = @TAPEDRIVE@ -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -# Maximum File Size = 3GB -## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" -## Changer Device = /dev/sg0 -## AutoChanger = yes -# # Enable the Alert command only if you have the mtx package loaded -## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" -## If you have smartctl, enable this, it has more info than tapeinfo -## Alert Command = "sh -c 'smartctl -H -l error %c'" -#} - -# -# A Linux or Solaris LTO-3 tape drive -# -#Device { -# Name = LTO-3 -# Media Type = LTO-3 -# Archive Device = @TAPEDRIVE@ -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -# Maximum File Size = 4GB -## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" -## Changer Device = /dev/sg0 -## AutoChanger = yes -# # Enable the Alert command only if you have the mtx package loaded -## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" -## If you have smartctl, enable this, it has more info than tapeinfo -## Alert Command = "sh -c 'smartctl -H -l error %c'" -#} - -# -# A Linux or Solaris LTO-4 tape drive -# -#Device { -# Name = LTO-4 -# Media Type = LTO-4 -# Archive Device = @TAPEDRIVE@ -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -# Maximum File Size = 5GB -## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" -## Changer Device = /dev/sg0 -## AutoChanger = yes -# # Enable the Alert command only if you have the mtx package loaded -## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" -## If you have smartctl, enable this, it has more info than tapeinfo -## Alert Command = "sh -c 'smartctl -H -l error %c'" -#} - - - - -# -# A FreeBSD tape drive -# -#Device { -# Name = DDS-4 -# Description = "DDS-4 for FreeBSD" -# Media Type = DDS-4 -# Archive Device = /dev/nsa1 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes -# Offline On Unmount = no -# Hardware End of Medium = no -# BSF at EOM = yes -# Backward Space Record = no -# Fast Forward Space File = no -# TWO EOF = yes -# If you have smartctl, enable this, it has more info than tapeinfo -# Alert Command = "sh -c 'smartctl -H -l error %c'" -#} - # # Send all messages to the Director, # mount messages also are sent to the email address