On 09/01/17 04:38, Julian Poß wrote:
May i ask you how you configured this? I would also prefer creating
virutal full backups, instead of encumbering the clients again.

OK, I figured that was next.  :)

We use Puppet to manage our Bareos configs, so you'll notice repeated things (like the identical comment spread over many different pieces of a config). What I did was take the running configs from our director and storage daemon and then washed them of either confidential stuff or simply stuff that you won't care about. Which could mean that the configs are no longer a drop in working setup.

My two cents would be to start with really small configuration setups, and then as you get each bit working slowly add more. Get your director, one file daemon (a.k.a. client), and one storage daemon working. Then add the second storage device. Then add the next bit, and so on. Use the documentation and these configs as patterns, ideas, and suggestions, but don't start from a copy-n-paste from either.

If I have a complaint about the documentation it is that config snippets aren't free-standing, they rely on Job Defs and other settings from other pieces of the config. Which means that it is difficult to copy a snippet from the docs to get it working. But it is one of the most fully documented projects that we use.

I'm sure you'll also notice that the configs were built around Bareos 15.2 and there are several features in 16.x that we aren't (yet?) taking advantage of. (I noticed an explicit comment about wildcards.) We also haven't yet split our config down into the bareos-dir.d/ pattern.

Many of our clients are back on Bareos 15, which works fine for Always Incremental as all of the extra bits are only in the Director. (Which is cool!)

Configs are attached.   Hope they help.

Also, do you have bareos-director version 16.2.4 installed?

I'm running Bareos 16.2.5 on FreeBSD 11.1 out of ports.

Good Luck.

--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.
#
# Bareos Director configuration file
#

director {
  name = bareos
  query file = "/usr/local/lib/bareos/scripts/query.sql" # FreeBSD
##query file = "/usr/lib/bareos/scripts/query.sql"       # Linux
  maximum concurrent jobs = 10
  password = "******"
  messages = daemon
  auditing = yes
}


##
## Job Definitions
##

@/usr/local/etc/bareos/jobs.conf

## Backup the catalog database (after the nightly backup)
job {
  name = "catalog"
  client = scotch
  job defs = "full"
  level = full
  file set = "catalog"
  schedule = "catalog"
  messages = "catalog"
  run before job = "/usr/local/lib/bareos/scripts/make_catalog_backup.pl 
catalog"
  run after job  = "/usr/local/lib/bareos/scripts/delete_catalog_backup"
  run after job  = "/usr/meridian/share/libexec/bareos/backup-report"
  write bootstrap = "/var/db/bareos/catalog-bootstrap.bsr"
  priority = 50                   # run after main backups
}

# Do an off-site backup of the catalog to tape.
# This runs after all of the off-site tapes are written to.
job {
  name = "catalog-offsite"
  client = scotch
  job defs = "offsite-backup"
  level = full
  file set = "catalog"
  schedule = "catalog-offsite"
  messages = "catalog"
  run script {
    console = "update jobid=%i jobtype=A"
    runs when = After
    runs on client = No
  }
  run before job = "/usr/local/lib/bareos/scripts/make_catalog_backup.pl 
catalog"
  run after job  = "/usr/meridian/share/libexec/bareos/backup-report"
  run after job  = "/usr/meridian/share/libexec/bareos/offsite-meta-sync" # 
Cleans up catalog dump file
  write bootstrap = "|/usr/local/bin/bsmtp -h localhost -f \"Bareos 
\<[email protected]\>\" -s \"Bootstrap for Job %j\" [email protected]"
  priority = 50                   # run after main backups
}

## Standard Restore template, to be changed by Console program
job {
  name = "restore"
  type = restore
  client = scotch
  file set = "standard"
  pool = "incremental"
  messages = "noisy"
  where = "/local-project/tmp/bareos/restores"
}

# Always Incremental consolidate job. This takes older incremental jobs and 
consolidates
# them into an updated full backup.
job {
  name = "consolidate"
  type = consolidate
  client = scotch                   # Every job needs a client, even if 
Consolidate jobs don't use it.
  max full consolidations = 13
  priority = 20                     # Run consolidate after the backup jobs, 
but before the catalog.
  pool = "always-incr"
  full backup pool = "consolidated"
  schedule = "consolidate"
  messages = "noisy"
  job defs = "common"
}


##
## Defaults for different Job types
##

job defs {
  name = "common"
  type = backup
  accurate = yes
  file set = "standard"
  messages = "standard"
  write bootstrap = "/var/db/bareos/bootstrap/%c.bsr"
  pool = "incremental"
  full backup pool = "full"
  differential backup pool = "differential"
  incremental backup pool = "incremental"
  spool attributes = yes
  maximum concurrent jobs = 10
  priority = 10
}

job defs {
  name = "full"
  job defs = "common"
  level = full
  schedule = "daily"
  pool = "full"
}

job defs {
  name = "incremental"
  type = backup
  accurate = yes
  file set = "standard"
  always incremental = yes
  always incremental job retention = 30 days
  always incremental keep number = 10
  always incremental max full age = 38 days
  pool = "always-incr"
  full backup pool = "consolidated"
  schedule = "daily"
  spool attributes = yes
  maximum concurrent jobs = 10
  messages = "standard"
  write bootstrap = "/var/db/bareos/bootstrap/%c.bsr"
}

job defs {
  name ="offsite-backup"
  type = backup
  level = full
  accurate = yes
  messages = "standard"
  write bootstrap = "/var/db/bareos/bootstrap/%c.bsr"
  pool = "offsite"
  spool data = yes
  spool attributes = yes
  full backup pool = "offsite"
  differential backup pool = "offsite"
  incremental backup pool = "offsite"
}

job defs {
  name = "ai-offsite"
  type = backup
  level = virtual full
  schedule = "offsite"
  # Gotta turn "virtual full" jobs into Archive jobs so we don't try to use the 
backup
  # for the next "virtual full" job.
  run script {
    console = "update jobid=%i jobtype=A"
    runs when = After
    runs on client = No
  }
  file set = "standard"
  accurate = yes
  messages = "noisy"
  write bootstrap = "/var/db/bareos/bootstrap/%c.bsr"
  pool = "consolidated"
  full backup pool = "consolidated"
  incremental backup pool = "always-incr"
  spool data = yes
  spool attributes = yes
  next pool = "offsite"
}


##
## File Set Definitions
##

# Warning!! Danger!!
# If you change a file set in the smallest way it will cause all jobs
# that use that file set to do a full backup next time.  If you change the
# "standard" file set that means that nearly every host will then have to
# do a full backup next time!
# YOU HAVE BEEN WARNED!

# From the Bareos docs:
## When the Director looks for a valid backup record in the catalog database, 
it looks for a previous Job with:
## The same Job name.
## The same Client name.
## The same FileSet (any change to the dedefinition of the FileSet such as 
adding or deleting a file in the Include or Exclude sections constitutes a 
different FileSet.
## The Job was a Full, Differential, or Incremental backup.
## The Job terminated normally (i.e. did not fail or was not canceled).
## The Job started no longer ago than Max Full Interval.

file set {
  name = "standard"
  ignore file set changes = yes # If we change the fileset then don't force a 
full backup next time.
  include {
    file = "/"
    exclude dir containing = ".no-backup"
    exclude dir containing = "NO-BACKUP"
    options {
      compression = gzip4       # gzip4 will saturate some slower CPUs with 
good IO sub-systems, like Hador
      signature = sha1          # I think it only does the checksum if it 
backups the file, uness 1 or 5 is in verify
      verify = ipnugsm          # inode, perms, num links, uid, gid, size, mtime
      accurate = ipnugsm        # inode, perms, num links, uid, gid, size, mtime
      one fs = no               # Do all local (see fs type) filesystems on the 
client
      fs type = ufs
      fs type = zfs
      fs type = ext2
      fs type = ext3
      fs type = ext4
      fs type = xfs
      fs type = zfs
      fs type = reiserfs
      fs type = jfs
      fs type = btrfs
      acl support = yes
      xattr support = yes
      sparse = no
      no atime = yes
      check file changes = no   # too many false positives
    }
  }
  exclude {
    file = "/var/db/bareos"
    file = "/tmp"
    file = "/var/tmp"
    file = ".journal"
    file = ".fsck"
    file = ".snap"
    file = "/local-project/tmp"
    file = "</usr/local/etc/bareos/excludes.director" # Exclude list on the 
director
    file = "\\</usr/local/etc/bareos/excludes"        # The backslashes mean 
the file is on the client
    file = "\\</usr/local/etc/bareos/excludes.auto"
  }
}

# Grab /jails/*/var/log but nothing else under /jails.
#  Bareos kinda sucks at this.
file set {
  name = "jail-logs"
  ignore file set changes = yes # If we change the fileset then don't force a 
full backup next time.
  include {
    file = "/jails"
    # This is convloted since the wild card is not the last item of the path.
    # See 
http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-1440009.5.3
    # The regex includes the leafs we care about, then the wild dir and finally 
a wild
    # have to explode the directories under the top level.
    # And then finally exclude everything else.
    options {
      regex dir = "/jails/[^/]+$"
      wild dir = "/jails/*/var"
      wild dir = "/jails/*/var/log"
      wild = "/jails/*/var/log/*"
      compression = gzip4
      signature = sha1
      verify = ipnugsm          # inode, perms, num links, uid, gid, size, mtime
      accurate = ipnugsm        # inode, perms, num links, uid, gid, size, mtime
      one fs = no
      acl support = yes
      xattr support = yes
      sparse = no
      no atime = yes
      check file changes = no   # too many false positives if turned on, 
especially for logs
    }
    options {
      wild = "/jails/*"
      exclude = yes
    }
  }
}

file set {
  name = "self-test"
  ignore file set changes = yes # If we change the fileset then don't force a 
full backup next time.
  include {
    file = "/etc"
    file = "/usr/local/etc"
    options {
##    compression = gzip4
      signature = sha1
      verify = ipnugsm          # inode, perms, num links, uid, gid, size, mtime
      accurate = ipnugsm        # inode, perms, num links, uid, gid, size, mtime
      acl support = yes
      xattr support = yes
      no atime = yes
      check file changes = yes
      one fs = yes
    }
  }
}

# This file set must backup all of the Bareos meta-data.
# Everything needed to recover from a disaster:
# * All config files
# * All encryption keys
# * Database catalog
file set {
  # This is the backup of the catalog
  name = "catalog"
  include {
    options {
      compression = gzip4       # gzip4 will saturate some slower CPUs with 
good IO sub-systems, like Hador
      signature = sha1
      verify = ipnugsm          # inode, perms, num links, uid, gid, size, mtime
      accurate = ipnugsm        # inode, perms, num links, uid, gid, size, mtime
      one fs = no               # Do all local (see fs type) filesystems on the 
client
      no atime = yes
      acl support = yes
      xattr support = yes
      no atime = yes
      check file changes = yes  # We care if the catalog files change as we are 
backing them up
    }
    file = "/local-project/bareos"
    file = "/usr/local/etc/bareos"
  }
}


##
## Schedule Definitions
##

# Our daily schedules spread full backups through out the week.

schedule {
  name = "daily"
  run = incremental at 21:00
}

# This schedule does the catalog. It starts after the daily
schedule {
  name = "catalog"
  run = full daily at 21:00
}

## Consolidate schedule works hard to avoid conflicting with off-site
## backups since both are very disk intensive on Scotch.
schedule {
  name = "consolidate"
  run = mon at 21:00
  run = tue at 21:00
  run = wed at 21:00
  run = thu at 21:00
  run = fri at 21:00
  run = sat at 21:00
}

# Offsite schedule happens once a week on Saturday
schedule {
  name = "offsite"
  run = saturday at 09:00
}

# Do this catalog run after the off-site backups
schedule {
  name = "catalog-offsite"
  run = full saturday at 09:00
}


##
## Client Definitions
##

## Sigh, we don't get wild card support for @ until version 16.2.1
##   @/usr/local/etc/bareos/clients/*.conf

@/usr/local/etc/bareos/clients.conf


##
## Pool Definitions
##

pool {
  name = full
  pool type = Backup     # Sigh, case sensitive
  next pool = offsite
  label format = "full-"
  file   retention = 28 days
  job    retention = 84 days
  volume retention = 84 days
  maximum volume bytes = 128 GB
  maximum volumes = 160
  storage = disk
}

pool {
  name = differential
  pool type = Backup     # Sigh, case sensitive
  label format = "differential-"
  file   retention = 14 days
  job    retention = 28 days
  volume retention = 28 days
  maximum volume bytes = 32 GB
  maximum volumes = 1024
  storage = disk
}

pool {
  name = incremental
  pool type = Backup     # Sigh, case sensitive
  label format = "incremental-"
  file   retention = 18 days
  job    retention = 18 days
  volume retention = 18 days
  maximum volume bytes = 16 GB
  maximum volumes = 1024
  storage = disk
}

pool {
  name = always-incr
  pool type = Backup     # Sigh, case sensitive
  label format = "incr-"
  auto prune = no
  maximum volume bytes = 16 GB
  maximum volumes = 1024
##volume use duration = 23 hours
  next pool = consolidated
  storage = disk
}

pool {
  name = consolidated
  pool type = Backup     # Sigh, case sensitive
  label format = "cons-"
  auto prune = no
  maximum volume bytes = 16 GB
  maximum volumes = 1024
##volume use duration = 23 hours
  storage = disk
}

pool {
  # No "Label Format" disables automatic volume labeling
  name = offsite
  pool type = Backup     # Sigh, case sensitive
  storage = lto6-1
  file   retention = 30 days
  job    retention = 90 days
  volume retention = 90 days
  maximum volume bytes = 2500 GB
  volume use duration = 48 hours
  recycle oldest volume = yes
}

pool {
  name = scratch
  pool type = Backup     # Sigh, case sensitive
}


##
## Storage Definitions
##

storage {
  name = disk
  address = bareos-sd.iteris.com
  password = "******"
  device = disk-0
  device = disk-1
  device = disk-2
  device = disk-3
  device = disk-4
  device = disk-5
  device = disk-6
  device = disk-7
  device = disk-8
  device = disk-9
  device = disk-10
  device = disk-11
  device = disk-12
  device = disk-13
  device = disk-14
  maximum concurrent jobs = 10
  media type = file
}

storage {
  name = lto6-1
  address = bareos-sd.iteris.com
  password = "******"
  device = lto6-1
  maximum concurrent jobs = 1
  media type = "lto-6"
}


##
## Messages Definitions
##

messages {
  name = standard
  mail command = "/usr/local/bin/bsmtp -h localhost -f \"Bareos 
\<[email protected]\>\" -s \"%t %e of %n %l\" %r"
  mail on error = [email protected] = all, !audit, !skipped
  operator command = "/usr/local/bin/bsmtp -h localhost -f \"Bareos 
\<[email protected]\>\" -s \"Intervention needed for %j\" %r"
  operator = [email protected] = mount
  console = all, !skipped, !saved, !audit
  append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
}

messages {
  name = noisy
  mail command = "/usr/local/bin/bsmtp -h localhost -f \"Bareos 
\<[email protected]\>\" -s \"%t %e of %n %l\" %r"
  mail = [email protected] = all, !skipped, !audit
  operator command = "/usr/local/bin/bsmtp -h localhost -f \"Bareos 
\<[email protected]\>\" -s \"Intervention needed for %j\" %r"
  operator = [email protected] = mount
  console = all, !skipped, !saved, !audit
  append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
}

messages {
  name = catalog
  mail command = "/usr/local/bin/bsmtp -h localhost -f \"Bareos 
\<[email protected]\>\" -s \"%t %e of %n %l\" %r"
  mail = [email protected] = all, !skipped, !audit
  operator command = "/usr/local/bin/bsmtp -h localhost -f \"Bareos 
\<[email protected]\>\" -s \"Intervention needed for %j\" %r"
  operator = [email protected] = mount
  console = all, !skipped, !saved, !audit
  append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
}

messages {
  name = daemon
  mail command = "/usr/local/bin/bsmtp -h localhost -f \"Bareos 
\<[email protected]\>\" -s \"Bareos daemon message\" %r"
  mail = [email protected] = all, !skipped, !audit
  console = all, !skipped, !saved, !audit
  append = "/var/log/bareos/bareos.log" = all, !skipped, !audit
  append = "/var/log/bareos/bareos-audit.log" = audit
}


##
## Catalog Definitions
##

catalog {
  name = catalog
  db driver = "pgsql"
  db name = "bareos"
  db user = "bareos"
  db password = "******"
  db address = "localhost"
  db port = 5432
}


##
## Console Definition
##
console {
  name = bareos-mon
  password = "******"
  command acl = status, .status
  job acl = *all*
}


##
## Web UI Definitions
##

profile {
  name = webui
  command acl = status, messages, show, version, run, rerun, cancel, .api, 
.bvfs_*, list, llist, use, restore, .jobs, .filesets, .clients
  job acl = *all*
  schedule acl = *all*
  catalog acl = *all*
  pool acl = *all*
  storage acl = *all*
  client acl = *all*
  file set acl = *all*
  where acl = *all*
}

console {
  name = admin
  password = "******"
  profile = webui
}
#
# Default Bareos Storage Daemon Configuration file
#
#  $Id$

storage {
  name = bareos-sd
  maximum concurrent jobs = 20
  plugin directory = /usr/local/lib/bareos/plugins/
}

device {
  name = disk-0
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-1
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-2
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-3
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-4
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-5
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-6
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-7
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-8
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-9
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-10
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-11
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-12
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-13
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}

device {
  name = disk-14
  media type = file
  archive device = /local-project/tmp/bareos/backups
  label media = yes                   # lets Bareos label unlabeled media, not 
for tapes
  random access = yes
  automatic mount = yes               # when device opened, read it
  removable media = no
  always open = no
  maximum concurrent jobs = 1
}


device {
  name = lto6-1
  archive device = /dev/nsa0
  media type = "lto-6"
  drive index = 0
  bsf at eom = yes
  hardware end of medium = no
  two eof = yes
  autochanger = yes
  # smartctl opens /dev/xpt0, so it needs to run as root
  # smartctl always exits with a status of 4, regardless of how things went, 
which sucks.
  ##alert command = "/usr/local/bin/sudo /usr/local/sbin/smartctl --device=scsi 
--health --log=error %a"
  maximum file size = 20GB
  spool directory = /local-project/tmp/bareos/spool
  maximum spool size = 1024 GB
  maximum concurrent jobs = 10
}

autochanger {
  name = changer
  device = lto6-1
  changer device = /dev/pass2
  changer command = "/usr/local/lib/bareos/scripts/mtx-changer %c %o %S %a %d"
}

director {
  name = bareos
  password = "******"
}

director {
  name = bareos-mon
  password = "******"
  monitor = yes
}

messages {
  name = standard
  director = bareos = all
  append = "/var/log/bareos/bareos.log" = all
}
## One of a hundred client definitions

client {
  name = delta
  address = delta.iteris.com
  password = "******"
  auto prune = yes
  file retention = 60
  job  retention = 180
}
# Two of around two hundred job definitions

job {
  name     = "delta"
  client   = "delta"
  job defs = "incremental"
}

job {
  name     = "delta-offsite"
  client   = "delta"
  job defs = "ai-offsite"
}

Reply via email to