# When to run backups Schedule { Name = "Daily" Run = Level=Full Pool=LTO-6-Tapes Jan 1st Mon at 18:00 Run = Level=Full Pool=LTO-6-Tapes Apr 1st Mon at 18:00 Run = Level=Full Pool=LTO-6-Tapes Jul 1st Mon at 18:00 Run = Level=Full Pool=LTO-6-Tapes Oct 1st Mon at 18:00 Run = at 18:00 } # Our tape collection, divided into three pools Pool { Name = LTO-4-Tapes Storage = LTO-5 Maximum Block Size = 1048576 Volume Retention = 12 months Volume Use Duration = 4 months Recycle Current Volume = Yes Maximum Volumes = 24 } Pool { Name = LTO-6-Tapes Storage = LTO-6 Maximum Block Size = 1048576 Volume Retention = 6 months Volume Use Duration = 1 week Recycle Current Volume = Yes Maximum Volumes = 31 } Pool { Name = LTO-6-Archiv Storage = LTO-6 Maximum Block Size = 1048576 Volume Retention = 6 months Volume Use Duration = 1 week Recycle Current Volume = Yes Maximum Volumes = 52 } # What to backup, defined as different filesets FileSet { Name = zpool2 Include { File = "/mnt/zpool2/.zfs/snapshot/bareos" Options { OneFs = No Signature = MD5 } } } FileSet { Name = Storage Include { File = "/mnt/zpool2/.zfs/snapshot/bareos-archive" File = "/mnt/zpool2/Steve/.zfs/snapshot/bareos-archive" Options { OneFs = No Signature = MD5 } } } FileSet { Name = Test Include { File = "/mnt/zpool3" Options { OneFs = No Signature = MD5 } } } FileSet { Name = DR Include { File = "/etc/bareos" Options { Signature = MD5 Exclude = Yes WildDir = "/etc/bareos/examples" } } Include { File = "/var/lib/bareos" Options { Signature = MD5 WildFile = "*.bsr" WildFile = "*.xz" WildFile = "*.bz2" WildFile = "*.zst" } Options { Exclude = Yes RegexFile = ".*" RegexDir = ".*" } } } # Job definition templates used in jobs themselves JobDefs { Name = Backup Type = Backup Accurate = Yes Level = Incremental Max Diff Interval = 32 days Client = bareos-fd Messages = Standard Max Wait Time = 3 days Max Start Delay = 3 hours Write Bootstrap = "/var/lib/bareos/%c_%n.bsr" Run Before Job = "/etc/bareos/tape-helper %p on" Run Script { Runs When = After Runs On Client = No Console = ".bvfs_update" } Run Script { Runs When = After Runs On Client = No Command = "sh -c \"echo run job=Server-Backup-DR pool=%p yes | /usr/bin/bconsole >/dev/null\"" } Run Script { Runs When = After Runs On Client = No Runs On Success = No Runs On Failure = Yes Command = "/etc/bareos/tape-helper %p off" } } JobDefs { Name = Backup-DR Type = Backup Accurate = Yes Level = Full Client = bareos-fd Messages = Standard Max Wait Time = 3 days Max Start Delay = 3 hours Write Bootstrap = "/var/lib/bareos/%c_%n.bsr" Run Before Job = "/etc/bareos/tape-helper %p on" Run Before Job = "sh -c '/usr/bin/pg_dumpall -U root -w -c --if-exists | ionice -c3 nice -n19 chrt -i 0 lbzip2 >/var/lib/bareos/postgresql.sql.bz2'" Run Before Job = "sh -c '/usr/bin/pg_dump -U root -w -c --if-exists bareos | ionice -c3 nice -n19 chrt -i 0 lbzip2 >/var/lib/bareos/postgresql-bareos.sql.bz2'" Run Script { Runs When = After Runs On Client = No Console = ".bvfs_update" } Run Script { Runs When = After Runs On Client = No Runs On Failure = Yes Command = "/usr/bin/rm -f /var/lib/bareos/postgresql*.sql.bz2" } Run Script { Runs When = After Runs On Client = No Runs On Failure = Yes Command = "/etc/bareos/tape-helper %p off" } } # Jobs which can be run Job { Name = Backup-Test JobDefs = Backup FileSet = Test Level = Full Pool = LTO-6-Archiv Max Wait Time = 12 hours } # Requires: zfs allow -u bareos mount,snapshot,destroy zpool2/storage # Check: zfs allow zpool2/storage Job { Name = Server-Backup JobDefs = Backup FileSet = zpool2 Pool = LTO-4-Tapes Schedule = "Daily" Run Before Job = "/etc/bareos/tape-helper create-snapshot bareos zpool2/storage" Run Script { Runs When = After Runs On Client = No Runs On Failure = Yes Command = "/etc/bareos/tape-helper delete-snapshot bareos zpool2/storage" } } Job { Name = Archiv-Backup JobDefs = Backup FileSet = Test # FileSet = Storage Pool = LTO-6-Archiv # Level = Full Run Before Job = "/etc/bareos/tape-helper create-snapshot bareos-archive zpool2/storage zpool2/steve" Run Script { Runs When = After Runs On Client = No Runs On Failure = Yes Command = "/etc/bareos/tape-helper delete-snapshot bareos-archive zpool2/storage zpool2/steve" } } Job { Name = Server-Backup-DR JobDefs = Backup-DR FileSet = DR Pool = LTO-4-Tapes } # The restore side JobDefs { Name = Restore Type = Restore Accurate = Yes Client = bareos-fd Messages = Standard Replace = Never FileSet = zpool2 # Where = /tmp/bareos-restores Where = /mnt/zpool2/Restore Run Before Job = "/etc/bareos/tape-helper %p on" Run Script { Runs When = After Runs On Client = No Runs On Failure = Yes Command = "/etc/bareos/tape-helper %p off" } } Job { Name = Restore-via-LTO5 JobDefs = Restore Pool = LTO-4-Tapes } Job { Name = Restore-via-LTO6 JobDefs = Restore Pool = LTO-6-Tapes } # Our tape drives Storage { Name = LTO-5 Address = 127.0.0.1 Password = "VobgekfKMCJxLqN3eCdPTdsbsAzPHA4UxaPqNLtwevXP" Device = LTO-5 Media Type = LTO-3-5 Collect Statistics = Yes TLS Enable = No } Storage { Name = LTO-6 Address = 127.0.0.1 Password = "VobgekfKMCJxLqN3eCdPTdsbsAzPHA4UxaPqNLtwevXP" Device = LTO-6 Media Type = LTO-4-6 Collect Statistics = Yes TLS Enable = No } # The database for the catalog Catalog { Name = "Bareos PostgreSQL" dbname = "bareos" dbuser = "bareos" dbpassword = "aaTgE3FWaCfMebRy4cFgLwEYyU3ApokritcUxaskiciM" Reconnect = Yes ExitOnFatal = Yes } # How to handle messages and operator requests Messages { Name = Standard operatorcommand = "/etc/bareos/tape-operator \"%w\" /usr/bin/bsmtp -h 127.0.0.1 -f \"Bareos \\" -s \"Bareos: Intervention needed for %j\" %r" mailcommand = "/usr/bin/bsmtp -h 127.0.0.1 -f \"Bareos \\" -s \"Bareos: %t %e of %c %l\" %r" operator = admin@example.com = mount mailonerror = admin@example.com = all, !skipped, !saved, !audit console = all, !skipped, !saved, !audit catalog = all, !skipped, !saved, !audit syslog = all, !skipped, !saved, !audit } Messages { Name = Daemon mailcommand = "/usr/bin/bsmtp -h 127.0.0.1 -f \"Bareos \\" -s \"Bareos daemon message\" %r" mail = admin@example.com = all, !skipped, !saved, !audit console = all, !skipped, !saved, !audit syslog = all, !skipped, !saved, !audit } # Rights profile for operator, used for web UI, restricted commands Profile { Name = operator Command ACL = !.bvfs_clear_cache, !.exit, !.sql, !configure, !create, !delete, !purge, !prune, !sqlquery, !umount, !unmount, *all* Job ACL = *all* Schedule ACL = *all* Catalog ACL = *all* Pool ACL = *all* Storage ACL = *all* Client ACL = *all* FileSet ACL = *all* Where ACL = *all* } # Web UI user Console { Name = admin Password = admin Profile = operator TLS Enable = No } #Console { # Name = bareos-mon # Password = "a4rrpHMFendgPHrydsqVrrNpHJiEMEuYLxFvXxFtbJer" # CommandACL = status, .status # JobACL = *all* #} # The file daemon Client { Name = bareos-fd Address = 127.0.0.1 Password = "qmwnUckJHhA4pneozpji9c9rmhRiFrexvcsvnNzKJtwo" File Retention = 100 years Job Retention = 100 years Maximum Concurrent Jobs = 2 Auto Prune = Yes TLS Enable = No } # General director configuration Director { Name = bareos-dir QueryFile = "/usr/lib/bareos/scripts/query.sql" Password = "ugv3CLuy49TJuyrpit7tAozHb3qsKELoFtyFrHtnAMFs" Messages = Daemon Auditing = Yes Dir Address = 127.0.0.1 Statistics Collect Interval = 30 Statistics Retention = 10 years Maximum Concurrent Jobs = 2 Key Encryption Key = "jzsFeTzb9qMJCm7sUt9tPrKNUvubRMYEkrRXMKdPh4Xo" TLS Enable = No }