Skip to content

Commit

Permalink
elaborated the disk-only default config
Browse files Browse the repository at this point in the history
Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
pstorz authored and Marco van Wieringen committed May 5, 2013
1 parent b78eea9 commit d24a3df
Showing 1 changed file with 89 additions and 99 deletions.
188 changes: 89 additions & 99 deletions src/defaultconfigs/diskonly/bareos-dir.conf.in
@@ -1,20 +1,52 @@
#
# Default Bareos Director Configuration file
# Default Bareos Director Configuration file for disk-only backup
# (C) Bareos GmbH & Co.KG
#
# You have to configure the following for your environment:
#
# (#1) Email Address for bareos disaster recovery.
# Specify a mailaddress outside of your backupserver.
# There will be one mail per day.
#
# (#2) 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)
#
# (#3) 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 (#2)
#
#
# This disk-only setup stores all data into @archivedir@
#
# In the following description of the backup scheme, a reference number
# shows where this property is set in the configuration file.
#
# The preconfigured backup scheme is as follows:
#
# Full Backups are done on first Saturday at 21:00 (#4)
# Full Backups are written into the "Full" Pool (#5)
# Full Backups are kept for 365 Days (#6)
#
# Differential Backups are done on 2nd to 5th Saturday at 21:00 (#7)
# Differential Backups are written into the "Differential" Pool (#8)
# Differential Backups are kept for 90 Days (#9)
#
# 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

Expand All @@ -27,16 +59,16 @@ JobDefs {
Type = Backup
Level = Incremental
Client = @basename@-fd
FileSet = "Full Set"
FileSet = "Linux All"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = File
Priority = 10
Write Bootstrap = "@working_dir@/%c.bsr"
Full Backup Pool = Full # write Full Backups into "Full" Pool
Differential Backup Pool = Differential # write Diff Backups into "Differential" Pool
Incremental Backup Pool = Incremental # write Incr Backups into "Incremental" Pool
Full Backup Pool = Full # write Full Backups into "Full" Pool (#5)
Differential Backup Pool = Differential # write Diff Backups into "Differential" Pool (#8)
Incremental Backup Pool = Incremental # write Incr Backups into "Incremental" Pool (#11)
}

#
Expand Down Expand Up @@ -67,7 +99,7 @@ Job {

# 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@" # (#1)
Priority = 11 # run after main backup
}

Expand All @@ -79,50 +111,13 @@ Job {
Name = "RestoreFiles"
Type = Restore
Client=@basename@-fd
FileSet="Full Set"
FileSet = "Linux All"
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 = <file-name
#
# Note: / backs up everything on the root partition.
# if you have other partitions such as /usr or /home
# you will probably want to add them too.
#
# By default this is defined to point to the Bareos binary
# directory to give a reasonable FileSet to backup to
# disk storage during initial testing.
#
File = @sbindir@
}

#
# If you backup the root directory, the following two excluded
# files can be useful
#
Exclude {
File = @working_dir@
File = @archivedir@
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}

FileSet {
Name = "Windows All Drives"
Expand All @@ -142,21 +137,48 @@ FileSet {
}
}

#
# When to do the backups, full backup on first sunday of the month,
# differential (i.e. incremental since full) every other sunday,
# and incremental backups other days

FileSet {
Name = "Linux All"
Include {
Options {
Signature = MD5 # calculate md5 checksum per file
One FS = No # change into other filessytems
FS Type = ext2 # filesystems of given types will be backed up
FS Type = ext3 # others will be ignored
FS Type = ext4
FS Type = xfs
FS Type = reiserfs
FS Type = jfs
}
File = /
}
# Things that usually have to be excluded
# You have to exclude @archivedir@
# on your bareos server
Exclude {
File = @working_dir@
File = @archivedir@
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}

}


Schedule {
Name = "WeeklyCycle"
Run = Full 1st sun at 23:05
Run = Differential 2nd-5th sun at 23:05
Run = Incremental mon-sat at 23:05
Run = Full 1st sat at 21:00 # (#4)
Run = Differential 2nd-5th sat at 21:00 # (#7)
Run = Incremental mon-fri at 21:00 # (#10)
}

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
Run = Full mon-fri at 21:10
}

# This is the backup of the catalog
Expand Down Expand Up @@ -212,27 +234,11 @@ Catalog {
#
Messages {
Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
# to replace the %r in the from field (-f part) with a single valid
# email address in both the mailcommand and the operatorcommand.
# What this does is, it sets the email address that emails would display
# in the FROM field, which is by default the same email as they're being
# sent to. However, if you send email to more than one address, then
# you'll have to set the FROM address manually, to a single address.
# for example, a 'no-reply@mydomain.com', is better since that tends to
# tell (most) people that its coming from an automated source.
#
mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bareos\) \<%r\>\" -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 # (#2)
operator = @job_email@ = mount # (#3)
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
}
Expand All @@ -243,21 +249,11 @@ Messages {
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 # (#2)
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
}

#
# Full Pool definition
Expand All @@ -267,12 +263,10 @@ Pool {
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # How long should the Full Backups be kept?
Maximum Volume Bytes = 1G # Limit Volume size to something reasonable
Volume Retention = 365 days # How long should the Full Backups be kept? (#6)
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-<volume-id>"
# and can be automatically labeled if
# "LabelMedia = yes" is set in device in bareos-sd.conf
}

#
Expand All @@ -283,12 +277,10 @@ Pool {
Pool Type = Backup
Recycle = yes # Bareos can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 90 days # How long should the Differential Backups be kept?
Maximum Volume Bytes = 1G # Limit Volume size to something reasonable
Volume Retention = 90 days # How long should the Differential Backups be kept? (#9)
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-<volume-id>"
# and can be automatically labeled if
# "LabelMedia = yes" is set in device in bareos-sd.conf
}

#
Expand All @@ -299,12 +291,10 @@ Pool {
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?
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-<volume-id>"
# and can be automatically labeled if
# "LabelMedia = yes" is set in device in bareos-sd.conf
}

#
Expand Down

0 comments on commit d24a3df

Please sign in to comment.