diff --git a/Dir Config/bacula-dir.conf b/Dir Config/bacula-dir.conf index 54ccdaf..7992424 100644 --- a/Dir Config/bacula-dir.conf +++ b/Dir Config/bacula-dir.conf @@ -38,7 +38,7 @@ Autochanger { # New resource Maximum Concurrent Jobs = 20 } -Storage { +Storage { # Can have multiple of these per autochanger Name = Drive-0-LTO-3 Address = 10.85.3.39 SDPort = 9103 @@ -101,3 +101,22 @@ messages { # Send mail to me and matthew mail = younglad204@gmail.com,kenwood364@gmail.com = all, !skipped console = all, !skipped, !saved } + +messages { # Send mail to me and Travis + name = TravissMail + mail = travisbuttons14@gmail.com,kenwood364@gmail.com = all, !skipped + console = all, !skipped, !saved +} + +messages { # Send mail to me and Zach + name = ZachsMail + mail = zmcmenemy@gmail.com,kenwood364@gmail.com = all, !skipped + console = all, !skipped, !saved +} + +messages { # Send mail to me and Caleb + name = CalebsMail + mail = younglad204@gmail.com,kenwood364@gmail.com = all, !skipped + console = all, !skipped, !saved +} + diff --git a/Dir Config/clients/zinc-client-archive.conf b/Dir Config/clients/zinc-client-archive.conf index d051208..cc973be 100644 --- a/Dir Config/clients/zinc-client-archive.conf +++ b/Dir Config/clients/zinc-client-archive.conf @@ -12,4 +12,62 @@ Job { # Archive Obelisk Full Backup Pool = Archive-Pool Incremental Backup Pool = Archive-Pool -} \ No newline at end of file +} + +Job { # Archive Magnesium + Name = "Archive-Magnesium" + Client = Zinc-Client + Type = "Backup" + 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" + 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" + 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" + 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.conf b/Dir Config/clients/zinc-client.conf index fdadb59..0d307ed 100644 --- a/Dir Config/clients/zinc-client.conf +++ b/Dir Config/clients/zinc-client.conf @@ -7,8 +7,8 @@ Client { Password = "iamnotacrook" Address = 10.85.3.31 Catalog = MyCatalog - File Retention = 6 months - Job Retention = 2 years + File Retention = 4 months + Job Retention = 30 years AutoPrune = yes # Prune expired Jobs/Files } diff --git a/Dir Config/filesets/filesets-archive.conf b/Dir Config/filesets/filesets-archive.conf index 9be6222..7bef45d 100644 --- a/Dir Config/filesets/filesets-archive.conf +++ b/Dir Config/filesets/filesets-archive.conf @@ -8,4 +8,15 @@ FileSet { } File = "/mnt/Obelisk/" } +} + +# Archive for Magnesium +FileSet { + Name = "Magnesium Archive" + Include { + Options { + signature = MD5 + } + File = "/mnt/Magnesium/" + } } \ No newline at end of file diff --git a/Dir Config/filesets/filesets-system.conf b/Dir Config/filesets/filesets-system.conf index 88cb3a9..8cd5bf1 100644 --- a/Dir Config/filesets/filesets-system.conf +++ b/Dir Config/filesets/filesets-system.conf @@ -22,3 +22,14 @@ FileSet { File = "/var/lib/postgresql/12/main" } } + +# Backup proxmox backups +FileSet { + Name = "ProxmoxBackups" + Include { + Options { + signature = MD5 + } + File = "/mnt/Proxmox/" + } +} diff --git a/Dir Config/filesets/filesets-users.conf b/Dir Config/filesets/filesets-users.conf index b180ce9..21e9c96 100644 --- a/Dir Config/filesets/filesets-users.conf +++ b/Dir Config/filesets/filesets-users.conf @@ -6,7 +6,34 @@ FileSet { signature = MD5 compression=GZIP } - File = "/mnt/Caleb/" + File = "/mnt/Users/Caleb/" + #File = "/mnt/NextCloud/data/Caleb/" + } +} + +# Travis's backup on zinc +FileSet { + Name = "Travis Backup" + Include { + Options { + signature = MD5 + compression=GZIP + } + File = "/mnt/Users/Travis/" + #File = "/mnt/NextCloud/data/Travis/" + } +} + +# Zach's backup on zinc +FileSet { + Name = "Zach Backup" + Include { + Options { + signature = MD5 + compression=GZIP + } + File = "/mnt/Users/Zach/" + #File = "/mnt/NextCloud/data/Zach/" } } @@ -18,8 +45,8 @@ FileSet { signature = MD5 compression=GZIP } - File = "/mnt/Mark/" - #File = "/mnt/NextCloud/data/mark/" + File = "/mnt/Users/mark/" + File = "/mnt/NextCloud/data/mark/" } } @@ -31,7 +58,7 @@ FileSet { signature = MD5 compression=GZIP } - File = "/mnt/Joe/" + File = "/mnt/Users/Joe/" File = "/mnt/NextCloud/data/joe/" } } @@ -44,7 +71,7 @@ FileSet { signature = MD5 compression=GZIP } - File = "/mnt/Matthew/" + File = "/mnt/Users/Matthew/" #File = "/mnt/NextCloud/data/matthew/" } } @@ -57,7 +84,7 @@ FileSet { signature = MD5 compression=GZIP } - File = "/mnt/Michael/" + File = "/mnt/Users/Michael/" #File = "/mnt/NextCloud/data/michael/" } } diff --git a/Dir Config/pools.conf b/Dir Config/pools.conf index d73805e..fc5f015 100644 --- a/Dir Config/pools.conf +++ b/Dir Config/pools.conf @@ -71,4 +71,6 @@ Pool { # When the volume is recycled, return it automatically to # this pool Recycle Pool = Scratch + + Cleaning Prefix = "CLN" } diff --git a/Dir Config/bacula-sd.conf b/Dir Config/sample/bacula-sd.conf.old similarity index 100% rename from Dir Config/bacula-sd.conf rename to Dir Config/sample/bacula-sd.conf.old diff --git a/Dir Config/schedules.conf b/Dir Config/schedules.conf index 27526c3..e5ce6fa 100644 --- a/Dir Config/schedules.conf +++ b/Dir Config/schedules.conf @@ -1,17 +1,17 @@ Schedule { Name = EveryTwoDays - Run = Level=Full jan 1st sun at 4:15 - Run = Level=Differential feb 1st sun at 4:15 - Run = Level=Differential mar 1st sun at 4:15 - Run = Level=Full apr 1st sun at 4:15 - Run = Level=Differential may 1st sun at 4:15 - Run = Level=Differential jun 1st sun at 4:15 - Run = Level=Full jul 1st sun at 4:15 - Run = Level=Differential aug 1st sun at 4:15 - Run = Level=Differential sep 1st sun at 4:15 - Run = Level=Full oct 1st sun at 4:15 - Run = Level=Differential nov 1st sun at 4:15 - Run = Level=Differential dec 1st sun at 4:15 + Run = Level=Full jan 1st sun at 2:15 + Run = Level=Differential feb 1st sun at 2:15 + Run = Level=Differential mar 1st sun at 2:15 + Run = Level=Full apr 1st sun at 2:15 + Run = Level=Differential may 1st sun at 2:15 + Run = Level=Differential jun 1st sun at 2:15 + Run = Level=Full jul 1st sun at 2:15 + Run = Level=Differential aug 1st sun at 2:15 + Run = Level=Differential sep 1st sun at 2:15 + Run = Level=Full oct 1st sun at 2:15 + Run = Level=Differential nov 1st sun at 2:15 + Run = Level=Differential dec 1st sun at 2:15 #Run = Level=Incremental tue at 2:15 Run = Level=Incremental sat at 2:15 @@ -19,18 +19,18 @@ Schedule { Schedule { Name = AdminTwoDays - Run = Level=Full jan 1st sun at 4:30 - Run = Level=Differential feb 1st sun at 4:30 - Run = Level=Differential mar 1st sun at 4:30 - Run = Level=Full apr 1st sun at 4:30 - Run = Level=Differential may 1st sun at 4:30 - Run = Level=Differential jun 1st sun at 4:30 - Run = Level=Full jul 1st sun at 4:30 - Run = Level=Differential aug 1st sun at 4:30 - Run = Level=Differential sep 1st sun at 4:30 - Run = Level=Full oct 1st sun at 4:30 - Run = Level=Differential nov 1st sun at 4:30 - Run = Level=Differential dec 1st sun at 4:30 + Run = Level=Full jan 1st sun at 2:30 + Run = Level=Differential feb 1st sun at 2:30 + Run = Level=Differential mar 1st sun at 2:30 + Run = Level=Full apr 1st sun at 2:30 + Run = Level=Differential may 1st sun at 2:30 + Run = Level=Differential jun 1st sun at 2:30 + Run = Level=Full jul 1st sun at 2:30 + Run = Level=Differential aug 1st sun at 2:30 + Run = Level=Differential sep 1st sun at 2:30 + Run = Level=Full oct 1st sun at 2:30 + Run = Level=Differential nov 1st sun at 2:30 + Run = Level=Differential dec 1st sun at 2:30 #Run = Level=Incremental tue at 2:30 Run = Level=Incremental sat at 2:30 diff --git a/Dir Config/scripts/bacula_discord_webhook.py b/Dir Config/scripts/bacula_discord_webhook.py new file mode 100644 index 0000000..1dc17f0 --- /dev/null +++ b/Dir Config/scripts/bacula_discord_webhook.py @@ -0,0 +1,20 @@ +from discord_webhook import DiscordWebhook +import subprocess + +webhookURL = "https://discordapp.com/api/webhooks/719690867811811348/8LExCQbqOPP0XAdNcbV8JHrVYupOSYmeLwkBJWCDCe72JoPyc4Yy_R2wzbkKSN33MPAn" + +out = subprocess.Popen(['echo messages | bconsole'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + shell=True) + +stdout,stderr = out.communicate() +print(stdout) +print(stderr) +cleaned_stdout = b"```" + stdout.partition(b"\nmessages\n")[2] + b"```" + +if (cleaned_stdout != b'```You have no messages.\n```'): + webhook = DiscordWebhook(url=webhookURL, content=cleaned_stdout) + response = webhook.execute() +else: + print("Done.") diff --git a/Library Config/saveRestore-06_05_20-013505 b/Library Config/saveRestore-06_05_20-013505 new file mode 100644 index 0000000..71c7af0 Binary files /dev/null and b/Library Config/saveRestore-06_05_20-013505 differ diff --git a/Notes.md b/Notes.md index d8e965b..45dd2fc 100644 --- a/Notes.md +++ b/Notes.md @@ -1,6 +1,6 @@ when you buy new tapes, install them in your library and run the -*label pool=Scratch storage=Iron-Autochanger slots=17,18,19,20,21,22,23,24,25,26 barcodes +*label pool=Scratch storage=Iron-Autochanger slots=3,11,27,28 barcodes command to write the initial label onto the tape (so bacula knows it's allowed to use the tape) and then bacula and scratch pool will do everything else libraries have slots, that command says "load the tape from slot 1 into the drive, and write a label to it matching its barcode. then repeat for slot 2. then repeat for slot 3"