diff --git a/Dir Config/bacula-barcodes b/Dir Config/bacula-barcodes deleted file mode 100644 index 0a0b2dc..0000000 --- a/Dir Config/bacula-barcodes +++ /dev/null @@ -1,51 +0,0 @@ -# -# Bacula barcode simulation file -# used by ${PREFIX}/sbin/chio-bacula (FreeBSD) -# -# The volumenames are returned by the "changer list" command -# labeling in the console is done by "label barcodes" -# (then all volumes belog to the default pool). -# All Lines with an "#" at the bedinning are ignored -# -# !!!! If you export an tape and reinsert another one, -# !!!! don't forget to change the volume name in this file! -# -1:Volume1-100 -2:Volume1-101 -3:Volume1-102 -4:Volume1-103 -5:Volume1-104 -6:Volume1-105 -7:Volume1-106 -8:Volume1-107 -9:Volume1-108 -10:Volume1-109 -11:Volume1-110 -12:Volume1-111 -# -# Further volumes exported from the changer -# -# 36GB AIT2 tapes -#Volume1-100 -#Volume1-101 -#Volume1-102 -#Volume1-103 -#Volume1-104 -#Volume1-105 -#Volume1-106 -#Volume1-107 -#Volume1-108 -#Volume1-109 -#Volume1-110 -#Volume1-111 -#Volume1-112 -#Volume1-113 -#Volume1-114 -#Volume1-115 -# -# 50GB AIT2 tapes -#Volume2-200 -#Volume2-201 -#Volume2-202 -#Volume2-203 -#Volume2-204 diff --git a/Dir Config/bacula-dir.conf b/Dir Config/bacula-dir.conf index d333c62..8b8e6f3 100644 --- a/Dir Config/bacula-dir.conf +++ b/Dir Config/bacula-dir.conf @@ -30,17 +30,19 @@ Catalog { Autochanger { # New resource Name = Iron-Autochanger - Address = 10.85.3.39 + Address = 10.85.3.34 + #Address = 10.85.3.35 SDPort = 9103 Password = "iamnotacrook" - Device = Drive-0-LTO-3 + Device = Drive-1-LTO-3 Media Type = LTO-3 Maximum Concurrent Jobs = 2 } Storage { # Can have multiple of these per autochanger - Name = Drive-0-LTO-3 - Address = 10.85.3.39 + Name = Drive-1-LTO-3 + Address = 10.85.3.34 + #Address = 10.85.3.35 SDPort = 9103 Password = "iamnotacrook" Device = LTO-3 @@ -130,6 +132,15 @@ messages { # Send mail to me and Caleb messages { # Send mail to me and Chris name = ChrisMail mail = chrispdo1373@gmail.com,kenwood364@gmail.com = all, !skipped + file = "/etc/bacula/scripts/webhooks/ChrisProEliteMail.md" = all, !skipped + console = all, !skipped, !saved + catalog = all +} + +messages { # Send mail to the robotics team + name = RoboticsMail + mail = kenwood364@gmail.com = all, !skipped + file = "/etc/bacula/scripts/webhooks/RoboticsMail.md" = all, !skipped console = all, !skipped, !saved catalog = all } diff --git a/Dir Config/bacula-dir.conf.backup b/Dir Config/bacula-dir.conf.backup deleted file mode 100644 index 1b95dfb..0000000 --- a/Dir Config/bacula-dir.conf.backup +++ /dev/null @@ -1,324 +0,0 @@ -# -# Default Bacula 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 Bacula release 9.4.2 (04 February 2019) -- ubuntu 20.04 -# -# 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. -# -# Copyright (C) 2000-2017 Kern Sibbald -# License: BSD 2-Clause; see file LICENSE-FOSS -# - -Director { # define myself - Name = bacula-dir - DIRport = 9101 # where we listen for UA connections - QueryFile = "/etc/bacula/scripts/query.sql" - WorkingDirectory = "/var/lib/bacula" - PidDirectory = "/run/bacula" - Maximum Concurrent Jobs = 20 - Password = "p2ee6NtCH6Y-mw3bVk5yGgo1wjXnyne4a" # Console password - Messages = Daemon - DirAddress = 127.0.0.1 -} - -JobDefs { - Name = "DefaultJob" - Type = Backup - Level = Incremental - Client = bacula-fd - FileSet = "Full Set" - Schedule = "WeeklyCycle" - Storage = File1 - Messages = Standard - Pool = File - SpoolAttributes = yes - Priority = 10 - Write Bootstrap = "/var/lib/bacula/%c.bsr" -} - - -# -# Define the main nightly save backup job -# By default, this job will back up to disk in /nonexistant/path/to/file/archive/dir -Job { - Name = "BackupClient1" - JobDefs = "DefaultJob" -} - -#Job { -# Name = "BackupClient2" -# Client = bacula2-fd -# JobDefs = "DefaultJob" -#} - -#Job { -# Name = "BackupClient1-to-Tape" -# JobDefs = "DefaultJob" -# Storage = LTO-4 -# Spool Data = yes # Avoid shoe-shine -# Pool = Default -#} - -#} - -# 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 = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog" - # This deletes the copy of the catalog - RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup" - Write Bootstrap = "/var/lib/bacula/%n.bsr" - 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=bacula-fd - Storage = File1 -# The FileSet and Pool directives are not used by Restore Jobs -# but must not be removed - FileSet="Full Set" - Pool = File - Messages = Standard - Where = /nonexistant/path/to/file/archive/dir/bacula-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 \"Bacula: %t %e of %c %l\" %r" - operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r" - mail = root = all, !skipped - operator = root = 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 = "/var/log/bacula/bacula.log" = all, !skipped - catalog = all -} - - -# -# Message delivery for daemon messages (no job). -Messages { - Name = Daemon - mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r" - mail = root = all, !skipped - console = all, !skipped, !saved - append = "/var/log/bacula/bacula.log" = all, !skipped -} - -# Default pool definition -Pool { - Name = Default - Pool Type = Backup - Recycle = yes # Bacula 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 -} - -# File Pool definition -Pool { - Name = File - Pool Type = Backup - Recycle = yes # Bacula 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 - Label Format = "Vol-" # Auto label -} - - -# Scratch pool definition -Pool { - Name = Scratch - Pool Type = Backup -} - -# -# Restricted console used by tray-monitor to get the status of the director -# -Console { - Name = bacula-mon - Password = "qh2ITlwo3xfTzP8uxwJjq1vJshc1Dsimc" - CommandACL = status, .status -} diff --git a/Dir Config/bacula-fd.conf.backup b/Dir Config/bacula-fd.conf.backup deleted file mode 100644 index d417044..0000000 --- a/Dir Config/bacula-fd.conf.backup +++ /dev/null @@ -1,49 +0,0 @@ -# -# Default Bacula File Daemon Configuration file -# -# For Bacula release 9.4.2 (04 February 2019) -- ubuntu 20.04 -# -# There is not much to change here except perhaps the -# File daemon Name to -# -# -# Copyright (C) 2000-2015 Kern Sibbald -# License: BSD 2-Clause; see file LICENSE-FOSS -# - -# -# List Directors who are permitted to contact this File daemon -# -Director { - Name = bacula-dir - Password = "plfcG_XSfD6EBSD0YQhZThlZNHFFFjqtg" -} - -# -# Restricted Director, used by tray-monitor to get the -# status of the file daemon -# -Director { - Name = bacula-mon - Password = "ULdl26830u9xQw1i8YI_VBqaIMG1OfE_V" - Monitor = yes -} - -# -# "Global" File daemon configuration specifications -# -FileDaemon { # this is me - Name = bacula-fd - FDport = 9102 # where we listen for the director - WorkingDirectory = /var/lib/bacula - Pid Directory = /run/bacula - Maximum Concurrent Jobs = 20 - Plugin Directory = /usr/lib/bacula - FDAddress = 127.0.0.1 -} - -# Send all messages except skipped files back to Director -Messages { - Name = Standard - director = bacula-dir = all, !skipped, !restored -} diff --git a/Dir Config/bacula-sd.conf b/Dir Config/bacula-sd.conf deleted file mode 100644 index 94786e1..0000000 --- a/Dir Config/bacula-sd.conf +++ /dev/null @@ -1,38 +0,0 @@ -Storage { # definition of myself - Name = test-bacula-sd # Name of this device - SDPort = 9103 # Director's port - WorkingDirectory = "/var/lib/bacula" # Working Directory - Pid Directory = "/run/bacula" # PID Directory - Plugin Directory = "/usr/lib/bacula" # Directory for plugins - Maximum Concurrent Jobs = 20 # Max jobs it can do at any one time - SDAddress = 127.0.0.1 # Address of the SD -} - -Director { # Director who is allowed to contact us - Name = bacula-dir # Name of the director - Password = "iamnotacrook" # Password for the director to usr to login -} - -#Autochanger { # Virtual Auto Changer -# Name = FileChgr1 # Has a name -# Device = FileChgr1-Dev1 # Seperate tape drives with commas -# Changer Command = "" # Not sure what this is for -# Changer Device = /dev/null # Device is not real -#} - -#Device { # Device for Autochanger -# Name = FileChgr1-Dev1 # Has a name -# Media Type = File1 # has a type of media -# Archive Device = /backup/tape # Archive location(?) not sure on this one -# LabelMedia = yes; # lets Bacula label unlabeled media -# Random Access = Yes; # Not sure what this is for -# AutomaticMount = yes; # when device opened, read it -# RemovableMedia = no; # Not sure what this is for -# AlwaysOpen = no; # Not sure what this is for -# Maximum Concurrent Jobs = 5 # Can do 5 jobs at once? (not sure how but ok) -#} - -Messages { # Place to send messages - Name = Standard # Send standard messag es - director = bacula-dir = all # Forward those to the director -} \ No newline at end of file diff --git a/Dir Config/bacula-sd.conf.backup b/Dir Config/bacula-sd.conf.backup deleted file mode 100644 index 1e4f95e..0000000 --- a/Dir Config/bacula-sd.conf.backup +++ /dev/null @@ -1,335 +0,0 @@ -# -# Default Bacula Storage Daemon Configuration file -# -# For Bacula release 9.4.2 (04 February 2019) -- ubuntu 20.04 -# -# 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. -# -# -# Copyright (C) 2000-2017 Kern Sibbald -# License: BSD 2-Clause; see file LICENSE-FOSS -# - -Storage { # definition of myself - Name = bacula-sd - SDPort = 9103 # Director's port - WorkingDirectory = "/var/lib/bacula" - Pid Directory = "/run/bacula" - Plugin Directory = "/usr/lib/bacula" - Maximum Concurrent Jobs = 20 - SDAddress = 127.0.0.1 -} - -# -# List Directors who are permitted to contact Storage daemon -# -Director { - Name = bacula-dir - Password = "wyHyTtf3Q5Mul8VvNNtm9D2lsIg2mKBVh" -} - -# -# Restricted Director, used by tray-monitor to get the -# status of the storage daemon -# -Director { - Name = bacula-mon - Password = "F988Q4o09gBCTwOO3hvk-DKGMtd-xKLo7" - Monitor = yes -} - -# -# Note, for a list of additional Device templates please -# see the directory /examples/devices -# Or follow the following link: -# http://www.bacula.org/git/cgit.cgi/bacula/tree/bacula/examples/devices?h=Branch-7.4 -# - -# -# Devices supported by this Storage daemon -# To connect, the Director's bacula-dir.conf must have the -# same Name and MediaType. -# - -# -# Define a Virtual autochanger -# -Autochanger { - Name = FileChgr1 - Device = FileChgr1-Dev1, FileChgr1-Dev2 - Changer Command = "" - Changer Device = /dev/null -} - -Device { - Name = FileChgr1-Dev1 - Media Type = File1 - Archive Device = /nonexistant/path/to/file/archive/dir - LabelMedia = yes; # lets Bacula label unlabeled media - Random Access = Yes; - AutomaticMount = yes; # when device opened, read it - RemovableMedia = no; - AlwaysOpen = no; - Maximum Concurrent Jobs = 5 -} - -Device { - Name = FileChgr1-Dev2 - Media Type = File1 - Archive Device = /nonexistant/path/to/file/archive/dir - LabelMedia = yes; # lets Bacula label unlabeled media - Random Access = Yes; - AutomaticMount = yes; # when device opened, read it - RemovableMedia = no; - AlwaysOpen = no; - Maximum Concurrent Jobs = 5 -} - -# -# Define a second Virtual autochanger -# -Autochanger { - Name = FileChgr2 - Device = FileChgr2-Dev1, FileChgr2-Dev2 - Changer Command = "" - Changer Device = /dev/null -} - -Device { - Name = FileChgr2-Dev1 - Media Type = File2 - Archive Device = /nonexistant/path/to/file/archive/dir - LabelMedia = yes; # lets Bacula label unlabeled media - Random Access = Yes; - AutomaticMount = yes; # when device opened, read it - RemovableMedia = no; - AlwaysOpen = no; - Maximum Concurrent Jobs = 5 -} - -Device { - Name = FileChgr2-Dev2 - Media Type = File2 - Archive Device = /nonexistant/path/to/file/archive/dir - LabelMedia = yes; # lets Bacula label unlabeled media - Random Access = Yes; - AutomaticMount = yes; # when device opened, read it - RemovableMedia = no; - AlwaysOpen = no; - Maximum Concurrent Jobs = 5 -} - - - -# -# An autochanger device with two drives -# -#Autochanger { -# Name = Autochanger -# Device = Drive-1 -# Device = Drive-2 -# Changer Command = "/etc/bacula/scripts/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 -# # -# # New alert command in Bacula 9.0.0 -# # Note: you must have the sg3_utils (rpms) or the -# # sg3-utils (deb) installed on your system. -# # and you must set the correct control device that -# # corresponds to the Archive Device -# Control Device = /dev/sg?? # must be SCSI ctl for /dev/nst0 -# Alert Command = "/etc/bacula/scripts/tapealert %l" -# -# # -# # 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 = /dev/nst0 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -# Maximum File Size = 3GB -## Changer Command = "/etc/bacula/scripts/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 = /dev/nst0 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -# Maximum File Size = 4GB -# Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d" -# Changer Device = /dev/sg0 -# AutoChanger = yes -# # -# # New alert command in Bacula 9.0.0 -# # Note: you must have the sg3_utils (rpms) or the -# # sg3-utils (deb) installed on your system. -# # and you must set the correct control device that -# # corresponds to the Archive Device -# Control Device = /dev/sg?? # must be SCSI ctl for /dev/nst0 -# Alert Command = "/etc/bacula/scripts/tapealert %l" -# -# # 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 = /dev/nst0 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -# Maximum File Size = 5GB -# Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d" -# Changer Device = /dev/sg0 -# AutoChanger = yes -# # -# # New alert command in Bacula 9.0.0 -# # Note: you must have the sg3_utils (rpms) or the -# # sg3-utils (deb) installed on your system. -# # and you must set the correct control device that -# # corresponds to the Archive Device -# Control Device = /dev/sg?? # must be SCSI ctl for /dev/nst0 -# Alert Command = "/etc/bacula/scripts/tapealert %l" -# -# # 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'" -#} - -# -# An HP-UX tape drive -# -#Device { -# Name = Drive-1 # -# Drive Index = 0 -# Media Type = DLT-8000 -# Archive Device = /dev/rmt/1mnb -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -# AutoChanger = no -# Two EOF = yes -# Hardware End of Medium = no -# Fast Forward Space File = no -# # -# # New alert command in Bacula 9.0.0 -# # Note: you must have the sg3_utils (rpms) or the -# # sg3-utils (deb) installed on your system. -# # and you must set the correct control device that -# # corresponds to the Archive Device -# Control Device = /dev/sg?? # must be SCSI ctl for /dev/rmt/1mnb -# Alert Command = "/etc/bacula/scripts/tapealert %l" -# -# # -# # 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 -# # -# # New alert command in Bacula 9.0.0 -# # Note: you must have the sg3_utils (rpms) or the -# # sg3-utils (deb) installed on your system. -# # and you must set the correct control device that -# # corresponds to the Archive Device -# Control Device = /dev/sg?? # must be SCSI ctl for /dev/nsa1 -# Alert Command = "/etc/bacula/scripts/tapealert %l" -# -# 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 = bacula-dir = all -} diff --git a/Dir Config/clients/director-client.conf b/Dir Config/clients/director-client.conf index 205cd6c..f38ce9d 100644 --- a/Dir Config/clients/director-client.conf +++ b/Dir Config/clients/director-client.conf @@ -33,6 +33,9 @@ Job { Schedule = EveryTwoDays Messages = JoesMail + Spool Data = yes # Spool data or dont on the sd + SpoolSize = 10737418240 + Reschedule Interval = 12 hours Reschedule On Error = yes Reschedule Times = 3 diff --git a/Dir Config/clients/zinc-client-archive.conf b/Dir Config/clients/zinc-client-archive.conf index cc973be..897bebc 100644 --- a/Dir Config/clients/zinc-client-archive.conf +++ b/Dir Config/clients/zinc-client-archive.conf @@ -2,72 +2,34 @@ Job { # Archive Obelisk Name = "Archive-Obelisk" - Client = Zinc-Client - Type = "Backup" + JobDefs = "Default-Archive-Job" FileSet = "Obelisk Archive" - Storage = Iron-Autochanger - Messages = JoesMail - - Pool = Archive-Pool # required parameter for all Jobs, despite what appears in the next few lines - - Full Backup Pool = Archive-Pool - Incremental Backup Pool = Archive-Pool } Job { # Archive Magnesium Name = "Archive-Magnesium" - Client = Zinc-Client - Type = "Backup" + JobDefs = "Default-Archive-Job" FileSet = "Magnesium Archive" - Storage = Iron-Autochanger - Messages = JoesMail - - Pool = Archive-Pool # required parameter for all Jobs, despite what appears in the next few lines - - Full Backup Pool = Archive-Pool - Incremental Backup Pool = Archive-Pool } - # Users go here Job { # Archive Travis Name = "Archive-Travis" - Client = Zinc-Client - Type = "Backup" + JobDefs = "Default-Archive-Job" FileSet = "Travis Backup" - Storage = Iron-Autochanger Messages = TravissMail - - Pool = Archive-Pool # required parameter for all Jobs, despite what appears in the next few lines - - Full Backup Pool = Archive-Pool - Incremental Backup Pool = Archive-Pool } Job { # Archive Zach Name = "Archive-Zach" - Client = Zinc-Client - Type = "Backup" + JobDefs = "Default-Archive-Job" FileSet = "Zach Backup" - Storage = Iron-Autochanger Messages = ZachsMail - - Pool = Archive-Pool # required parameter for all Jobs, despite what appears in the next few lines - - Full Backup Pool = Archive-Pool - Incremental Backup Pool = Archive-Pool } Job { # Archive Caleb Name = "Archive-Caleb" - Client = Zinc-Client - Type = "Backup" + JobDefs = "Default-Archive-Job" FileSet = "Caleb Backup" - Storage = Iron-Autochanger Messages = CalebsMail - - Pool = Archive-Pool # required parameter for all Jobs, despite what appears in the next few lines - - Full Backup Pool = Archive-Pool - Incremental Backup Pool = Archive-Pool } diff --git a/Dir Config/clients/zinc-client-other.conf b/Dir Config/clients/zinc-client-other.conf deleted file mode 100644 index 5436d8d..0000000 --- a/Dir Config/clients/zinc-client-other.conf +++ /dev/null @@ -1,15 +0,0 @@ -# These are jobs run for vms, storage, archive, etc - -Job { # Archive Obelisk - Name = "Archive-Obelisk" - Client = Zinc-Client - Type = "Backup" - FileSet = "Obelisk Archive" - Storage = Iron-Autochanger - Messages = JoesMail - - Pool = Archive-Pool # required parameter for all Jobs, despite what appears in the next few lines - - Full Backup Pool = Archive-Pool - Incremental Backup Pool = Archive-Pool -} \ No newline at end of file diff --git a/Dir Config/clients/zinc-client-system.conf b/Dir Config/clients/zinc-client-system.conf index 591e9b4..a10ebef 100644 --- a/Dir Config/clients/zinc-client-system.conf +++ b/Dir Config/clients/zinc-client-system.conf @@ -2,20 +2,13 @@ Job { # Backup Proxmox VZdumps Name = "Backup-Proxmox" - Client = Zinc-Client - Type = "Backup" + JobDefs = "Default-System-Job" FileSet = "Proxmox Backups" - Storage = Iron-Autochanger - Schedule = EveryTwoDays - Messages = JoesMail - - Reschedule Interval = 12 hours - Reschedule On Error = yes - Reschedule Times = 3 - - Pool = Full-Pool # required parameter for all Jobs, despite what appears in the next few lines - - Full Backup Pool = Full-Pool - Differential Backup Pool = Diff-Pool - Incremental Backup Pool = Incr-Pool } + +Job { # Backup Robotics Team's Files + Name = "Backup-Robotics" + JobDefs = "Default-System-Job" + FileSet = "Google-Drive Robotics" + Messages = RoboticsMail +} \ No newline at end of file diff --git a/Dir Config/clients/zinc-client-users.conf b/Dir Config/clients/zinc-client-users.conf index 887c7d8..44f96de 100644 --- a/Dir Config/clients/zinc-client-users.conf +++ b/Dir Config/clients/zinc-client-users.conf @@ -4,6 +4,7 @@ Job { # Caleb's Job Name = "Backup-Caleb" JobDefs = "Default-User-Job" FileSet = "Caleb Backup" + Schedule = Never } Job { # Mark's Job diff --git a/Dir Config/clients/zinc-client.conf b/Dir Config/clients/zinc-client.conf index bbb614e..bb6900c 100644 --- a/Dir Config/clients/zinc-client.conf +++ b/Dir Config/clients/zinc-client.conf @@ -12,7 +12,7 @@ Client { AutoPrune = yes # Prune expired Jobs/Files } -JobDefs { # Default Job +JobDefs { # Default User Job Name = "Default-User-Job" Client = Zinc-Client Type = "Backup" @@ -20,6 +20,9 @@ JobDefs { # Default Job Storage = Iron-Autochanger Schedule = EveryTwoDays Messages = JoesMail + + Spool Data = yes # Spool data or dont on the sd + SpoolSize = 10737418240 Reschedule Interval = 12 hours Reschedule On Error = yes @@ -31,3 +34,43 @@ JobDefs { # Default Job Differential Backup Pool = Diff-Pool Incremental Backup Pool = Incr-Pool } + +JobDefs { # Default Archive Job + Name = "Default-Archive-Job" + Client = Zinc-Client + Type = "Backup" + FileSet = "Catalog" + Storage = Iron-Autochanger + Messages = JoesMail + + Spool Data = yes # Spool data or dont on the sd + SpoolSize = 10737418240 + + Pool = Archive-Pool # required parameter for all Jobs, despite what appears in the next few lines + + Full Backup Pool = Archive-Pool + Incremental Backup Pool = Archive-Pool +} + +JobDefs { # Default System Job + Name = "Default-System-Job" + Client = Zinc-Client + Type = "Backup" + FileSet = "Catalog" + Storage = Iron-Autochanger + Schedule = EveryTwoDays + Messages = JoesMail + + Spool Data = yes # Spool data or dont on the sd + SpoolSize = 16106127360 + + Reschedule Interval = 12 hours + Reschedule On Error = yes + Reschedule Times = 3 + + Pool = Full-Pool # required parameter for all Jobs, despite what appears in the next few lines + + Full Backup Pool = Full-Pool + Differential Backup Pool = Diff-Pool + Incremental Backup Pool = Incr-Pool +} diff --git a/Dir Config/common_default_passwords b/Dir Config/common_default_passwords deleted file mode 100644 index 00b0a24..0000000 --- a/Dir Config/common_default_passwords +++ /dev/null @@ -1,12 +0,0 @@ -# -# This file has been autogenerated during package installation and -# holds defaults for new Bacula packages installed on this system. It -# is used only when you install a new Bacula package, and can be -# safely removed at any time. - -DIRPASSWD=p2ee6NtCH6Y-mw3bVk5yGgo1wjXnyne4a -DIRMPASSWD=qh2ITlwo3xfTzP8uxwJjq1vJshc1Dsimc -SDPASSWD=wyHyTtf3Q5Mul8VvNNtm9D2lsIg2mKBVh -SDMPASSWD=F988Q4o09gBCTwOO3hvk-DKGMtd-xKLo7 -FDPASSWD=plfcG_XSfD6EBSD0YQhZThlZNHFFFjqtg -FDMPASSWD=ULdl26830u9xQw1i8YI_VBqaIMG1OfE_V diff --git a/Dir Config/filesets.conf b/Dir Config/filesets.conf deleted file mode 100644 index 27fd90e..0000000 --- a/Dir Config/filesets.conf +++ /dev/null @@ -1,100 +0,0 @@ -# Bacula config Backup -FileSet { - Name = "MyFirstFileSet" - Include { - Options { - signature=MD5 - } - File = /etc/bacula/ - } - Exclude { - File = *~ - } -} - -# This is the backup of the catalog -FileSet { - Name = "Catalog" - Include { - Options { - signature = MD5 - } - File = "/var/lib/postgresql/12/main" - } -} - -# Caleb's backup on zinc -FileSet { - Name = "Caleb Backup" - Include { - Options { - signature = MD5 - compression=GZIP - } - File = "/mnt/Caleb/" - } -} - -# Mark's backup on zinc -FileSet { - Name = "Mark Backup" - Include { - Options { - signature = MD5 - compression=GZIP - } - File = "/mnt/Mark/" - #File = "/mnt/NextCloud/data/mark/" - } -} - -# Joe's backup on zinc -FileSet { - Name = "Joe Backup" - Include { - Options { - signature = MD5 - compression=GZIP - } - File = "/mnt/Joe/" - File = "/mnt/NextCloud/data/joe/" - } -} - -# Matthew's backup on zinc -FileSet { - Name = "Matthew Backup" - Include { - Options { - signature = MD5 - compression=GZIP - } - File = "/mnt/Matthew/" - #File = "/mnt/NextCloud/data/matthew/" - } -} - -# Michael's backup on zinc -FileSet { - Name = "Michael Backup" - Include { - Options { - signature = MD5 - compression=GZIP - } - File = "/mnt/Michael/" - #File = "/mnt/NextCloud/data/michael/" - } -} - -# Archive for Obelisk -FileSet { - Name = "Obelisk Archive" - Include { - Options { - signature = MD5 - compression=GZIP - } - File = "/mnt/Obelisk/" - } -} \ No newline at end of file diff --git a/Dir Config/filesets/filesets-system.conf b/Dir Config/filesets/filesets-system.conf index 175f12a..5aa0f6c 100644 --- a/Dir Config/filesets/filesets-system.conf +++ b/Dir Config/filesets/filesets-system.conf @@ -33,3 +33,15 @@ FileSet { File = "/mnt/Proxmox/" } } + +# Backup 1721's Google Drives +FileSet { + Name = "Google-Drive Robotics" + Include { + Options { + signature = MD5 + } + File = "/mnt/1721_Drive/" + } +} + diff --git a/Dir Config/schedules.conf b/Dir Config/schedules.conf index bd074f8..d890efd 100644 --- a/Dir Config/schedules.conf +++ b/Dir Config/schedules.conf @@ -42,3 +42,7 @@ Schedule { #Run = Level=Incremental sat tue at 2:30 } + +Schedule { + Name = Never +} \ No newline at end of file diff --git a/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py b/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py new file mode 100644 index 0000000..b51c0a9 --- /dev/null +++ b/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py @@ -0,0 +1,22 @@ +from discord_webhook import DiscordWebhook, DiscordEmbed + +webhookURL = "https://discordapp.com/api/webhooks/742784012640190565/NBhtbWpDdgMZPx7uCXO8Ofw-o8Lez0V17EBGIvYv7FTIeTENK24GHNL3krUbYnOOIJ63" +maxCharPerMessage = 1994 + +with open ("/etc/bacula/scripts/webhooks/ChrisProEliteMail.md", "r") as myfile: + cleaned_stdout=myfile.read() + +if "Termination: Backup OK" in cleaned_stdout: + truncated_stdout = ["Job Backup-Chris completed with status Backup OK, omitting full report.\nAll data from nextcloud was successfully written to tape on " + datetime.now().strftime("%d/%m/%Y %H:%M:%S") + "."] +else: + # Discord limits each message to 2000 chars, if the message is longer than that, truncate it + truncated_stdout = [cleaned_stdout[i:i+maxCharPerMessage] for i in range(0, len(cleaned_stdout), maxCharPerMessage)] + +print (truncated_stdout) # Print the truncated message + + +for message_part in truncated_stdout: # For every message part in the truncated output, run this loop + message_part = "```" + message_part + "```" # Encapsulate the messsage + print(message_part) + webhook = DiscordWebhook(url=webhookURL, content=message_part) # Attach the message + response = webhook.execute() # Hit send diff --git a/Dir Config/scripts/webhooks/ChrisProEliteMail.md b/Dir Config/scripts/webhooks/ChrisProEliteMail.md new file mode 100644 index 0000000..982d684 --- /dev/null +++ b/Dir Config/scripts/webhooks/ChrisProEliteMail.md @@ -0,0 +1,52 @@ +11-Aug 12:41 bacula-dir JobId 310: Start Backup JobId 310, Job=Backup-Chris.2020-08-11_12.41.09_06 +11-Aug 12:41 bacula-dir JobId 310: Using Device "Drive-1-LTO-3" to write. +11-Aug 12:41 bacula-iron-sd JobId 310: 3304 Issuing autochanger "load Volume PF6866, Slot 7, Drive 1" command. +11-Aug 12:41 bacula-iron-sd JobId 310: 3305 Autochanger "load Volume PF6866, Slot 7, Drive 1", status is OK. +11-Aug 12:41 bacula-iron-sd JobId 310: Volume "PF6866" previously written, moving to end of data. +11-Aug 12:42 bacula-iron-sd JobId 310: Ready to append to end of Volume "PF6866" at file=76. +11-Aug 12:42 bacula-iron-sd JobId 310: Spooling data ... +11-Aug 12:42 bacula-iron-sd JobId 310: Committing spooled data to Volume "PF6866". Despooling 430 bytes ... +11-Aug 12:42 bacula-iron-sd JobId 310: Despooling elapsed time = 00:00:01, Transfer rate = 430 Bytes/second +11-Aug 12:42 bacula-iron-sd JobId 310: Elapsed time=00:00:01, Transfer rate=0 Bytes/second +11-Aug 12:43 bacula-iron-sd JobId 310: Sending spooled attrs to the Director. Despooling 0 bytes ... +11-Aug 12:43 bacula-dir JobId 310: Bacula bacula-dir 9.4.2 (04Feb19): + Build OS: x86_64-pc-linux-gnu ubuntu 20.04 + JobId: 310 + Job: Backup-Chris.2020-08-11_12.41.09_06 + Backup Level: Incremental, since=2020-08-11 02:29:34 + Client: "Zinc-Client" 9.6.3 (09Mar20) amd64-portbld-freebsd11.3,freebsd,11.3-RELEASE-p8 + FileSet: "Chris Backup" 2020-06-23 16:46:12 + Pool: "Incr-Pool" (From Job IncPool override) + Catalog: "MyCatalog" (From Client resource) + Storage: "Iron-Autochanger" (From Pool resource) + Scheduled time: 11-Aug-2020 12:41:08 + Start time: 11-Aug-2020 12:41:12 + End time: 11-Aug-2020 12:43:00 + Elapsed time: 1 min 48 secs + Priority: 10 + FD Files Written: 0 + SD Files Written: 0 + FD Bytes Written: 0 (0 B) + SD Bytes Written: 0 (0 B) + Rate: 0.0 KB/s + Software Compression: None + Comm Line Compression: None + Snapshot/VSS: no + Encryption: no + Accurate: no + Volume name(s): + Volume Session Id: 13 + Volume Session Time: 1596908811 + Last Volume Bytes: 239,752,719,360 (239.7 GB) + Non-fatal FD errors: 0 + SD Errors: 0 + FD termination status: OK + SD termination status: OK + Termination: Backup OK + +11-Aug 12:43 bacula-dir JobId 310: Begin pruning Jobs older than 30 years . +11-Aug 12:43 bacula-dir JobId 310: No Jobs found to prune. +11-Aug 12:43 bacula-dir JobId 310: Begin pruning Files. +11-Aug 12:43 bacula-dir JobId 310: No Files found to prune. +11-Aug 12:43 bacula-dir JobId 310: End auto prune. + diff --git a/Dir Config/scripts/webhooks/Robotics-Bacula-Webhook.py b/Dir Config/scripts/webhooks/Robotics-Bacula-Webhook.py new file mode 100644 index 0000000..ddf3cb3 --- /dev/null +++ b/Dir Config/scripts/webhooks/Robotics-Bacula-Webhook.py @@ -0,0 +1,23 @@ +from discord_webhook import DiscordWebhook, DiscordEmbed +from datetime import datetime + +webhookURL = "https://discordapp.com/api/webhooks/740630755259973713/CNhxPBJ4C6UZ-m1DVXUQ54KeJQD3I9Di0sAwldmyjw-s7dMPUWplq7rhGXegpWGtKSve" +maxCharPerMessage = 1994 + +with open ("/etc/bacula/scripts/webhooks/RoboticsMail.md", "r") as myfile: + cleaned_stdout=myfile.read() + +if "Termination: Backup OK" in cleaned_stdout: + truncated_stdout = ["Job Backup-Robotics completed with status Backup OK, omitting full report.\nAll data from google drive was successfully written to tape on " + datetime.now().strftime("%d/%m/%Y %H:%M:%S") + "."] +else: + # Discord limits each message to 2000 chars, if the message is longer than that, truncate it + truncated_stdout = [cleaned_stdout[i:i+maxCharPerMessage] for i in range(0, len(cleaned_stdout), maxCharPerMessage)] + +print (truncated_stdout) # Print the truncated message + + +for message_part in truncated_stdout: # For every message part in the truncated output, run this loop + message_part = "```" + message_part + "```" # Encapsulate the messsage + print(message_part) + webhook = DiscordWebhook(url=webhookURL, content=message_part) # Attach the message + response = webhook.execute() # Hit send diff --git a/Dir Config/scripts/webhooks/RoboticsMail.md b/Dir Config/scripts/webhooks/RoboticsMail.md new file mode 100644 index 0000000..39c711a --- /dev/null +++ b/Dir Config/scripts/webhooks/RoboticsMail.md @@ -0,0 +1,47 @@ +11-Aug 02:56 bacula-dir JobId 308: Start Backup JobId 308, Job=Backup-Robotics.2020-08-11_02.15.00_10 +11-Aug 02:56 bacula-dir JobId 308: Using Device "Drive-1-LTO-3" to write. +11-Aug 02:56 bacula-iron-sd JobId 308: Spooling data ... +11-Aug 02:56 bacula-iron-sd JobId 308: Committing spooled data to Volume "PF6866". Despooling 788,279,412 bytes ... +11-Aug 02:56 bacula-iron-sd JobId 308: Despooling elapsed time = 00:00:12, Transfer rate = 65.68 M Bytes/second +11-Aug 02:56 bacula-iron-sd JobId 308: Elapsed time=00:00:27, Transfer rate=29.16 M Bytes/second +11-Aug 02:56 bacula-iron-sd JobId 308: Sending spooled attrs to the Director. Despooling 24,152 bytes ... +11-Aug 02:56 bacula-dir JobId 308: Bacula bacula-dir 9.4.2 (04Feb19): + Build OS: x86_64-pc-linux-gnu ubuntu 20.04 + JobId: 308 + Job: Backup-Robotics.2020-08-11_02.15.00_10 + Backup Level: Incremental, since=2020-08-07 15:31:45 + Client: "Zinc-Client" 9.6.3 (09Mar20) amd64-portbld-freebsd11.3,freebsd,11.3-RELEASE-p8 + FileSet: "Google-Drive Robotics" 2020-08-05 15:36:42 + Pool: "Incr-Pool" (From Job IncPool override) + Catalog: "MyCatalog" (From Client resource) + Storage: "Iron-Autochanger" (From Pool resource) + Scheduled time: 11-Aug-2020 02:15:00 + Start time: 11-Aug-2020 02:56:27 + End time: 11-Aug-2020 02:56:55 + Elapsed time: 28 secs + Priority: 10 + FD Files Written: 98 + SD Files Written: 98 + FD Bytes Written: 787,531,312 (787.5 MB) + SD Bytes Written: 787,545,944 (787.5 MB) + Rate: 28126.1 KB/s + Software Compression: None + Comm Line Compression: 1.2% 1.0:1 + Snapshot/VSS: no + Encryption: no + Accurate: no + Volume name(s): PF6866 + Volume Session Id: 12 + Volume Session Time: 1596908811 + Last Volume Bytes: 239,752,654,848 (239.7 GB) + Non-fatal FD errors: 0 + SD Errors: 0 + FD termination status: OK + SD termination status: OK + Termination: Backup OK + +11-Aug 02:56 bacula-dir JobId 308: Begin pruning Jobs older than 30 years . +11-Aug 02:56 bacula-dir JobId 308: No Jobs found to prune. +11-Aug 02:56 bacula-dir JobId 308: Begin pruning Files. +11-Aug 02:56 bacula-dir JobId 308: No Files found to prune. +11-Aug 02:56 bacula-dir JobId 308: End auto prune.