From ad5cff747187140ec3f989a3cd625a1265ae27b1 Mon Sep 17 00:00:00 2001 From: Joe S <31870999+KenwoodFox@users.noreply.github.com> Date: Sat, 3 Oct 2020 01:22:50 -0400 Subject: [PATCH] Modified everything (and added firebn) --- Dir Config/bacula-dir.conf | 8 +++ Dir Config/clients/zinc-client-users.conf | 9 ++- Dir Config/filesets/filesets-users.conf | 12 ++++ Dir Config/pools.conf | 1 + .../scripts/webhooks/._sync_3f5c94a4c959.db | Bin 90112 -> 90112 bytes .../scripts/webhooks/Aidan-Bacula-Mail.md | 68 ++++++++---------- .../webhooks/ChrisProElite-Bacula-Webhook.py | 2 +- .../scripts/webhooks/ChrisProEliteMail.md | 56 +++++++-------- .../scripts/webhooks/Christina-Bacula-Mail.md | 60 ++++++++-------- .../scripts/webhooks/FireBN-Bacula-Mail.md | 54 ++++++++++++++ .../scripts/webhooks/FireBN-Bacula-Webhook.py | 12 ++++ .../scripts/webhooks/Julio-Bacula-Mail.md | 46 ++++++------ Dir Config/scripts/webhooks/RoboticsMail.md | 58 +++++++-------- .../__pycache__/bathook.cpython-38.pyc | Bin 3408 -> 3397 bytes Dir Config/scripts/webhooks/bathook.py | 2 +- 15 files changed, 238 insertions(+), 150 deletions(-) create mode 100644 Dir Config/scripts/webhooks/FireBN-Bacula-Mail.md create mode 100644 Dir Config/scripts/webhooks/FireBN-Bacula-Webhook.py diff --git a/Dir Config/bacula-dir.conf b/Dir Config/bacula-dir.conf index 6f3bab6..ff3bd15 100644 --- a/Dir Config/bacula-dir.conf +++ b/Dir Config/bacula-dir.conf @@ -177,3 +177,11 @@ messages { # Send mail to me and Aidan console = all, !skipped, !saved catalog = all } + +messages { # Send mail to me and FireBN + name = FireBNMail + mail = kenwood364@gmail.com = all, !skipped + file = "/etc/bacula/scripts/webhooks/FireBN-Bacula-Mail.md" = all, !skipped + console = all, !skipped, !saved + catalog = all +} diff --git a/Dir Config/clients/zinc-client-users.conf b/Dir Config/clients/zinc-client-users.conf index 1e77eb4..a3ec006 100644 --- a/Dir Config/clients/zinc-client-users.conf +++ b/Dir Config/clients/zinc-client-users.conf @@ -65,4 +65,11 @@ Job { # Backup Aidan JobDefs = "Default-User-Job" FileSet = "Aidan Backup" Messages = AidanMail -} \ No newline at end of file +} + +Job { # Backup FireBN + Name = "Backup-FireBN" + JobDefs = "Default-User-Job" + FileSet = "FireBN Backup" + Messages = FireBNMail +} diff --git a/Dir Config/filesets/filesets-users.conf b/Dir Config/filesets/filesets-users.conf index d5e026f..4b55722 100644 --- a/Dir Config/filesets/filesets-users.conf +++ b/Dir Config/filesets/filesets-users.conf @@ -149,3 +149,15 @@ FileSet { File = "/mnt/NextCloud/data/aidan/" } } + +# FireBN's backup on zinc +FileSet { + Name = "FireBN Backup" + Include { + Options { + signature = MD5 + compression=GZIP + } + File = "/mnt/NextCloud/data/firebn/" + } +} diff --git a/Dir Config/pools.conf b/Dir Config/pools.conf index d5888a3..a4af0d9 100644 --- a/Dir Config/pools.conf +++ b/Dir Config/pools.conf @@ -47,6 +47,7 @@ Pool { Name = Archive-Pool Pool Type = Backup Recycle = no + Recycle Pool = Scratch AutoPrune = no Volume Retention = 30 years Storage = Iron-Autochanger diff --git a/Dir Config/scripts/webhooks/._sync_3f5c94a4c959.db b/Dir Config/scripts/webhooks/._sync_3f5c94a4c959.db index 8c1e799f7560733b631c294261132302d04ba899..91fd0a40c533f00dfcfe696854f1ed8c8fb4be2c 100644 GIT binary patch delta 2622 zcmZuzd2Ce28Q;g+cx~{GIelN?gd%J__sk0o4hE_ggE6Q+VMXV7Q%oTSLtObEoUK$E z6e4B&(zBC`l_-Nu)@A z_r00lcfR-Fh4Ke4l%EZ1)>XWps#&~jN#**gLlyl?uPv3;$Fsl4JOb?EXDj|v`P*#6 zlIvdGa}L$~seC5iV3scqL^_knlx23Y+C`aMW%aB4)R*5f;DuG68lQ}M`@4FTdEl_> z+NH)1Z#-gYh8>uC_8CE-Fp=gWL_B1O3n{gr3`(U#!YGCW5g0-`VVF_!$kef^@rm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avx!KvnSIv{PC*}80fXKGdcd!jBgw?!Pdzir>!qoRl42l$y(Hv4p{E&GG)GvGRSAp81{ zHa#5BY~{k}z6aAI!2$b;N0yErE1j@rPwDvZ(UY@V(xbudc_TkIv`6ZXFUp}gtB#aP zAN9I=A@0%bm-CCmOJ<__@`0eMvDlj)3*ujF>KYr*rnd%49$&jSnPhO{$g%mS-gm4t zwK#v=u3a46klq;_Dyh=(dHvMd-dJ_~V2}@Hs!tva4mVEsr}qVMr7s`ks<#gYxrRd9 K<>2Ulz<&W!PD(5Q diff --git a/Dir Config/scripts/webhooks/Aidan-Bacula-Mail.md b/Dir Config/scripts/webhooks/Aidan-Bacula-Mail.md index 642552a..9f591e6 100644 --- a/Dir Config/scripts/webhooks/Aidan-Bacula-Mail.md +++ b/Dir Config/scripts/webhooks/Aidan-Bacula-Mail.md @@ -1,54 +1,48 @@ -23-Sep 23:59 bacula-dir JobId 437: No prior Full backup Job record found. -23-Sep 23:59 bacula-dir JobId 437: No prior or suitable Full backup found in catalog. Doing FULL backup. -23-Sep 23:59 bacula-dir JobId 437: Start Backup JobId 437, Job=Backup-Aidan.2020-09-23_23.59.41_16 -23-Sep 23:59 bacula-dir JobId 437: Using Device "Drive-1-LTO-3" to write. -24-Sep 00:00 bacula-iron-sd JobId 437: 3304 Issuing autochanger "load Volume A00718, Slot 2, Drive 1" command. -24-Sep 00:00 bacula-iron-sd JobId 437: 3305 Autochanger "load Volume A00718, Slot 2, Drive 1", status is OK. -24-Sep 00:00 bacula-iron-sd JobId 437: Volume "A00718" previously written, moving to end of data. -24-Sep 00:06 bacula-iron-sd JobId 437: Ready to append to end of Volume "A00718" at file=85. -24-Sep 00:06 bacula-iron-sd JobId 437: Spooling data ... -24-Sep 00:06 bacula-iron-sd JobId 437: Committing spooled data to Volume "A00718". Despooling 16,131,668 bytes ... -24-Sep 00:06 bacula-iron-sd JobId 437: Despooling elapsed time = 00:00:01, Transfer rate = 16.13 M Bytes/second -24-Sep 00:06 bacula-iron-sd JobId 437: Elapsed time=00:00:02, Transfer rate=8.057 M Bytes/second -24-Sep 00:06 bacula-iron-sd JobId 437: Sending spooled attrs to the Director. Despooling 4,978 bytes ... -24-Sep 00:06 bacula-dir JobId 437: Bacula bacula-dir 9.4.2 (04Feb19): +29-Sep 02:29 bacula-dir JobId 448: Start Backup JobId 448, Job=Backup-Aidan.2020-09-29_02.15.00_48 +29-Sep 02:29 bacula-dir JobId 448: Using Device "Drive-0-LTO-3" to write. +29-Sep 02:29 bacula-iron-sd JobId 448: Spooling data ... +29-Sep 02:29 bacula-iron-sd JobId 448: Committing spooled data to Volume "A02106". Despooling 430 bytes ... +29-Sep 02:29 bacula-iron-sd JobId 448: Despooling elapsed time = 00:00:01, Transfer rate = 430 Bytes/second +29-Sep 02:29 bacula-iron-sd JobId 448: Elapsed time=00:00:01, Transfer rate=0 Bytes/second +29-Sep 02:29 bacula-iron-sd JobId 448: Sending spooled attrs to the Director. Despooling 0 bytes ... +29-Sep 02:29 bacula-dir JobId 448: Bacula bacula-dir 9.4.2 (04Feb19): Build OS: x86_64-pc-linux-gnu ubuntu 20.04 - JobId: 437 - Job: Backup-Aidan.2020-09-23_23.59.41_16 - Backup Level: Full (upgraded from Incremental) + JobId: 448 + Job: Backup-Aidan.2020-09-29_02.15.00_48 + Backup Level: Incremental, since=2020-09-23 23:59:43 Client: "Zinc-Client" 9.6.3 (09Mar20) amd64-portbld-freebsd11.3,freebsd,11.3-RELEASE-p8 FileSet: "Aidan Backup" 2020-09-23 23:43:52 - Pool: "Full-Pool" (From Job FullPool override) + Pool: "Incr-Pool" (From Job IncPool override) Catalog: "MyCatalog" (From Client resource) Storage: "Iron-Autochanger" (From Pool resource) - Scheduled time: 23-Sep-2020 23:59:40 - Start time: 23-Sep-2020 23:59:43 - End time: 24-Sep-2020 00:06:32 - Elapsed time: 6 mins 49 secs + Scheduled time: 29-Sep-2020 02:15:00 + Start time: 29-Sep-2020 02:29:42 + End time: 29-Sep-2020 02:29:44 + Elapsed time: 2 secs Priority: 10 - FD Files Written: 21 - SD Files Written: 21 - FD Bytes Written: 16,112,636 (16.11 MB) - SD Bytes Written: 16,115,542 (16.11 MB) - Rate: 39.4 KB/s - Software Compression: 5.8% 1.1:1 + 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): A00718 - Volume Session Id: 25 - Volume Session Time: 1599755230 - Last Volume Bytes: 338,586,587,136 (338.5 GB) + Volume name(s): + Volume Session Id: 10 + Volume Session Time: 1601284581 + Last Volume Bytes: 227,983,537,152 (227.9 GB) Non-fatal FD errors: 0 SD Errors: 0 FD termination status: OK SD termination status: OK Termination: Backup OK -24-Sep 00:06 bacula-dir JobId 437: Begin pruning Jobs older than 30 years . -24-Sep 00:06 bacula-dir JobId 437: No Jobs found to prune. -24-Sep 00:06 bacula-dir JobId 437: Begin pruning Files. -24-Sep 00:06 bacula-dir JobId 437: No Files found to prune. -24-Sep 00:06 bacula-dir JobId 437: End auto prune. +29-Sep 02:29 bacula-dir JobId 448: Begin pruning Jobs older than 30 years . +29-Sep 02:29 bacula-dir JobId 448: No Jobs found to prune. +29-Sep 02:29 bacula-dir JobId 448: Begin pruning Files. +29-Sep 02:29 bacula-dir JobId 448: No Files found to prune. +29-Sep 02:29 bacula-dir JobId 448: End auto prune. diff --git a/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py b/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py index 0ea567b..d9a1d84 100644 --- a/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py +++ b/Dir Config/scripts/webhooks/ChrisProElite-Bacula-Webhook.py @@ -7,7 +7,7 @@ maxCharPerMessage = 1994 bathook = bathook("/etc/bacula/scripts/webhooks/ChrisProEliteMail.md", "nextcloud") for message_part in bathook.get_formatted_message(): # For every message part in the truncated output, run this loop -webhook = DiscordWebhook(url=webhookURL, username="Snowsune's Bacula Daemon") # Attach the message + webhook = DiscordWebhook(url=webhookURL, username="Snowsune's Bacula Daemon") # Attach the message webhook.add_embed(bathook.get_discord_embed()) response = webhook.execute() # Hit send #message_part = "```" + message_part + "```" # Encapsulate the messsage diff --git a/Dir Config/scripts/webhooks/ChrisProEliteMail.md b/Dir Config/scripts/webhooks/ChrisProEliteMail.md index ca2d5dd..eaa0029 100644 --- a/Dir Config/scripts/webhooks/ChrisProEliteMail.md +++ b/Dir Config/scripts/webhooks/ChrisProEliteMail.md @@ -1,48 +1,48 @@ -22-Sep 02:24 bacula-dir JobId 430: Start Backup JobId 430, Job=Backup-Chris.2020-09-22_02.15.00_18 -22-Sep 02:24 bacula-dir JobId 430: Using Device "Drive-0-LTO-3" to write. -22-Sep 02:24 bacula-iron-sd JobId 430: Spooling data ... -22-Sep 02:24 bacula-iron-sd JobId 430: Committing spooled data to Volume "A02106". Despooling 912 bytes ... -22-Sep 02:24 bacula-iron-sd JobId 430: Despooling elapsed time = 00:00:01, Transfer rate = 912 Bytes/second -22-Sep 02:24 bacula-iron-sd JobId 430: Elapsed time=00:00:03, Transfer rate=144 Bytes/second -22-Sep 02:24 bacula-iron-sd JobId 430: Sending spooled attrs to the Director. Despooling 658 bytes ... -22-Sep 02:24 bacula-dir JobId 430: Bacula bacula-dir 9.4.2 (04Feb19): +29-Sep 02:23 bacula-dir JobId 444: Start Backup JobId 444, Job=Backup-Chris.2020-09-29_02.15.00_44 +29-Sep 02:23 bacula-dir JobId 444: Using Device "Drive-1-LTO-3" to write. +29-Sep 02:23 bacula-iron-sd JobId 444: Spooling data ... +29-Sep 02:23 bacula-iron-sd JobId 444: Committing spooled data to Volume "PF6866". Despooling 430 bytes ... +29-Sep 02:23 bacula-iron-sd JobId 444: Despooling elapsed time = 00:00:01, Transfer rate = 430 Bytes/second +29-Sep 02:23 bacula-iron-sd JobId 444: Elapsed time=00:00:04, Transfer rate=0 Bytes/second +29-Sep 02:23 bacula-iron-sd JobId 444: Sending spooled attrs to the Director. Despooling 0 bytes ... +29-Sep 02:23 bacula-dir JobId 444: Bacula bacula-dir 9.4.2 (04Feb19): Build OS: x86_64-pc-linux-gnu ubuntu 20.04 - JobId: 430 - Job: Backup-Chris.2020-09-22_02.15.00_18 - Backup Level: Incremental, since=2020-09-15 02:19:54 + JobId: 444 + Job: Backup-Chris.2020-09-29_02.15.00_44 + Backup Level: Incremental, since=2020-09-22 02:24:36 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: 22-Sep-2020 02:15:00 - Start time: 22-Sep-2020 02:24:36 - End time: 22-Sep-2020 02:24:40 - Elapsed time: 4 secs + Scheduled time: 29-Sep-2020 02:15:00 + Start time: 29-Sep-2020 02:23:48 + End time: 29-Sep-2020 02:23:55 + Elapsed time: 7 secs Priority: 10 - FD Files Written: 4 - SD Files Written: 4 + FD Files Written: 0 + SD Files Written: 0 FD Bytes Written: 0 (0 B) - SD Bytes Written: 434 (434 B) + SD Bytes Written: 0 (0 B) Rate: 0.0 KB/s Software Compression: None - Comm Line Compression: 3.8% 1.0:1 + Comm Line Compression: None Snapshot/VSS: no Encryption: no Accurate: no - Volume name(s): A02106 - Volume Session Id: 19 - Volume Session Time: 1599755230 - Last Volume Bytes: 226,742,777,856 (226.7 GB) + Volume name(s): + Volume Session Id: 6 + Volume Session Time: 1601284581 + Last Volume Bytes: 419,424,897,024 (419.4 GB) Non-fatal FD errors: 0 SD Errors: 0 FD termination status: OK SD termination status: OK Termination: Backup OK -22-Sep 02:24 bacula-dir JobId 430: Begin pruning Jobs older than 30 years . -22-Sep 02:24 bacula-dir JobId 430: No Jobs found to prune. -22-Sep 02:24 bacula-dir JobId 430: Begin pruning Files. -22-Sep 02:24 bacula-dir JobId 430: No Files found to prune. -22-Sep 02:24 bacula-dir JobId 430: End auto prune. +29-Sep 02:23 bacula-dir JobId 444: Begin pruning Jobs older than 30 years . +29-Sep 02:23 bacula-dir JobId 444: No Jobs found to prune. +29-Sep 02:23 bacula-dir JobId 444: Begin pruning Files. +29-Sep 02:23 bacula-dir JobId 444: No Files found to prune. +29-Sep 02:23 bacula-dir JobId 444: End auto prune. diff --git a/Dir Config/scripts/webhooks/Christina-Bacula-Mail.md b/Dir Config/scripts/webhooks/Christina-Bacula-Mail.md index 8ae90f3..1fc792a 100644 --- a/Dir Config/scripts/webhooks/Christina-Bacula-Mail.md +++ b/Dir Config/scripts/webhooks/Christina-Bacula-Mail.md @@ -1,48 +1,48 @@ -22-Sep 02:24 bacula-dir JobId 432: Start Backup JobId 432, Job=Backup-Christina.2020-09-22_02.15.00_20 -22-Sep 02:24 bacula-dir JobId 432: Using Device "Drive-0-LTO-3" to write. -22-Sep 02:24 bacula-iron-sd JobId 432: Spooling data ... -22-Sep 02:32 bacula-iron-sd JobId 432: Committing spooled data to Volume "A02106". Despooling 10,218,102 bytes ... -22-Sep 02:32 bacula-iron-sd JobId 432: Despooling elapsed time = 00:00:01, Transfer rate = 10.21 M Bytes/second -22-Sep 02:32 bacula-iron-sd JobId 432: Elapsed time=00:08:07, Transfer rate=20.96 K Bytes/second -22-Sep 02:32 bacula-iron-sd JobId 432: Sending spooled attrs to the Director. Despooling 3,367 bytes ... -22-Sep 02:32 bacula-dir JobId 432: Bacula bacula-dir 9.4.2 (04Feb19): +29-Sep 02:23 bacula-dir JobId 446: Start Backup JobId 446, Job=Backup-Christina.2020-09-29_02.15.00_46 +29-Sep 02:23 bacula-dir JobId 446: Using Device "Drive-1-LTO-3" to write. +29-Sep 02:23 bacula-iron-sd JobId 446: Spooling data ... +29-Sep 02:34 bacula-iron-sd JobId 446: Committing spooled data to Volume "PF6866". Despooling 454 bytes ... +29-Sep 02:34 bacula-iron-sd JobId 446: Despooling elapsed time = 00:00:01, Transfer rate = 454 Bytes/second +29-Sep 02:34 bacula-iron-sd JobId 446: Elapsed time=00:10:37, Transfer rate=0 Bytes/second +29-Sep 02:34 bacula-iron-sd JobId 446: Sending spooled attrs to the Director. Despooling 0 bytes ... +29-Sep 02:34 bacula-dir JobId 446: Bacula bacula-dir 9.4.2 (04Feb19): Build OS: x86_64-pc-linux-gnu ubuntu 20.04 - JobId: 432 - Job: Backup-Christina.2020-09-22_02.15.00_20 - Backup Level: Incremental, since=2020-09-15 02:20:01 + JobId: 446 + Job: Backup-Christina.2020-09-29_02.15.00_46 + Backup Level: Incremental, since=2020-09-22 02:24:44 Client: "Zinc-Client" 9.6.3 (09Mar20) amd64-portbld-freebsd11.3,freebsd,11.3-RELEASE-p8 FileSet: "Christina Backup" 2020-08-25 02:15:00 Pool: "Incr-Pool" (From Job IncPool override) Catalog: "MyCatalog" (From Client resource) Storage: "Iron-Autochanger" (From Pool resource) - Scheduled time: 22-Sep-2020 02:15:00 - Start time: 22-Sep-2020 02:24:44 - End time: 22-Sep-2020 02:32:53 - Elapsed time: 8 mins 9 secs + Scheduled time: 29-Sep-2020 02:15:00 + Start time: 29-Sep-2020 02:23:58 + End time: 29-Sep-2020 02:34:37 + Elapsed time: 10 mins 39 secs Priority: 10 - FD Files Written: 16 - SD Files Written: 16 - FD Bytes Written: 10,205,589 (10.20 MB) - SD Bytes Written: 10,207,724 (10.20 MB) - Rate: 20.9 KB/s - Software Compression: 7.6% 1.1:1 + 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): A02106 - Volume Session Id: 21 - Volume Session Time: 1599755230 - Last Volume Bytes: 226,753,099,776 (226.7 GB) + Volume name(s): + Volume Session Id: 8 + Volume Session Time: 1601284581 + Last Volume Bytes: 419,425,026,048 (419.4 GB) Non-fatal FD errors: 0 SD Errors: 0 FD termination status: OK SD termination status: OK Termination: Backup OK -22-Sep 02:32 bacula-dir JobId 432: Begin pruning Jobs older than 30 years . -22-Sep 02:32 bacula-dir JobId 432: No Jobs found to prune. -22-Sep 02:32 bacula-dir JobId 432: Begin pruning Files. -22-Sep 02:32 bacula-dir JobId 432: No Files found to prune. -22-Sep 02:32 bacula-dir JobId 432: End auto prune. +29-Sep 02:34 bacula-dir JobId 446: Begin pruning Jobs older than 30 years . +29-Sep 02:34 bacula-dir JobId 446: No Jobs found to prune. +29-Sep 02:34 bacula-dir JobId 446: Begin pruning Files. +29-Sep 02:34 bacula-dir JobId 446: No Files found to prune. +29-Sep 02:34 bacula-dir JobId 446: End auto prune. diff --git a/Dir Config/scripts/webhooks/FireBN-Bacula-Mail.md b/Dir Config/scripts/webhooks/FireBN-Bacula-Mail.md new file mode 100644 index 0000000..5965c87 --- /dev/null +++ b/Dir Config/scripts/webhooks/FireBN-Bacula-Mail.md @@ -0,0 +1,54 @@ +02-Oct 00:32 bacula-dir JobId 452: No prior Full backup Job record found. +02-Oct 00:32 bacula-dir JobId 452: No prior or suitable Full backup found in catalog. Doing FULL backup. +02-Oct 00:32 bacula-dir JobId 452: Start Backup JobId 452, Job=Backup-FireBN.2020-10-02_00.32.42_34 +02-Oct 00:32 bacula-dir JobId 452: Using Device "Drive-1-LTO-3" to write. +02-Oct 00:33 bacula-iron-sd JobId 452: 3304 Issuing autochanger "load Volume A00718, Slot 2, Drive 1" command. +02-Oct 00:33 bacula-iron-sd JobId 452: 3305 Autochanger "load Volume A00718, Slot 2, Drive 1", status is OK. +02-Oct 00:33 bacula-iron-sd JobId 452: Volume "A00718" previously written, moving to end of data. +02-Oct 00:37 bacula-iron-sd JobId 452: Ready to append to end of Volume "A00718" at file=86. +02-Oct 00:37 bacula-iron-sd JobId 452: Spooling data ... +02-Oct 00:38 bacula-iron-sd JobId 452: Committing spooled data to Volume "A00718". Despooling 16,131,821 bytes ... +02-Oct 00:38 bacula-iron-sd JobId 452: Despooling elapsed time = 00:00:01, Transfer rate = 16.13 M Bytes/second +02-Oct 00:38 bacula-iron-sd JobId 452: Elapsed time=00:00:02, Transfer rate=8.057 M Bytes/second +02-Oct 00:38 bacula-iron-sd JobId 452: Sending spooled attrs to the Director. Despooling 5,169 bytes ... +02-Oct 00:38 bacula-dir JobId 452: Bacula bacula-dir 9.4.2 (04Feb19): + Build OS: x86_64-pc-linux-gnu ubuntu 20.04 + JobId: 452 + Job: Backup-FireBN.2020-10-02_00.32.42_34 + Backup Level: Full (upgraded from Incremental) + Client: "Zinc-Client" 9.6.3 (09Mar20) amd64-portbld-freebsd11.3,freebsd,11.3-RELEASE-p8 + FileSet: "FireBN Backup" 2020-10-02 00:32:42 + Pool: "Full-Pool" (From Job FullPool override) + Catalog: "MyCatalog" (From Client resource) + Storage: "Iron-Autochanger" (From Pool resource) + Scheduled time: 02-Oct-2020 00:32:40 + Start time: 02-Oct-2020 00:32:45 + End time: 02-Oct-2020 00:38:04 + Elapsed time: 5 mins 19 secs + Priority: 10 + FD Files Written: 22 + SD Files Written: 22 + FD Bytes Written: 16,112,636 (16.11 MB) + SD Bytes Written: 16,115,677 (16.11 MB) + Rate: 50.5 KB/s + Software Compression: 5.8% 1.1:1 + Comm Line Compression: None + Snapshot/VSS: no + Encryption: no + Accurate: no + Volume name(s): A00718 + Volume Session Id: 13 + Volume Session Time: 1601284581 + Last Volume Bytes: 338,602,779,648 (338.6 GB) + Non-fatal FD errors: 0 + SD Errors: 0 + FD termination status: OK + SD termination status: OK + Termination: Backup OK + +02-Oct 00:38 bacula-dir JobId 452: Begin pruning Jobs older than 30 years . +02-Oct 00:38 bacula-dir JobId 452: No Jobs found to prune. +02-Oct 00:38 bacula-dir JobId 452: Begin pruning Files. +02-Oct 00:38 bacula-dir JobId 452: No Files found to prune. +02-Oct 00:38 bacula-dir JobId 452: End auto prune. + diff --git a/Dir Config/scripts/webhooks/FireBN-Bacula-Webhook.py b/Dir Config/scripts/webhooks/FireBN-Bacula-Webhook.py new file mode 100644 index 0000000..d36e125 --- /dev/null +++ b/Dir Config/scripts/webhooks/FireBN-Bacula-Webhook.py @@ -0,0 +1,12 @@ +from discord_webhook import DiscordWebhook, DiscordEmbed +from bathook import bathook + +webhookURL = "https://discordapp.com/api/webhooks/761445293932937246/sqPUm2RCG5jYLnCCVh13uDw-eXlyiVX0NssW9XOse6KXTnZwWcXFJ-c4gdOwBDO2QP1b" +maxCharPerMessage = 1994 + +bathook = bathook("/etc/bacula/scripts/webhooks/FireBN-Bacula-Mail.md", "FireBN") + +for message_part in bathook.get_formatted_message(): # For every message part in the truncated output, run this loop + webhook = DiscordWebhook(url=webhookURL, username="Vixi's Nextcloud-Bacula Daemon") # Attach the message + webhook.add_embed(bathook.get_discord_embed()) + response = webhook.execute() # Hit send \ No newline at end of file diff --git a/Dir Config/scripts/webhooks/Julio-Bacula-Mail.md b/Dir Config/scripts/webhooks/Julio-Bacula-Mail.md index 508fda4..30b0af6 100644 --- a/Dir Config/scripts/webhooks/Julio-Bacula-Mail.md +++ b/Dir Config/scripts/webhooks/Julio-Bacula-Mail.md @@ -1,23 +1,23 @@ -22-Sep 02:30 bacula-dir JobId 433: Start Backup JobId 433, Job=Backup-Julio.2020-09-22_02.15.00_21 -22-Sep 02:30 bacula-dir JobId 433: Using Device "Drive-1-LTO-3" to write. -22-Sep 02:30 bacula-iron-sd JobId 433: Spooling data ... -22-Sep 02:30 bacula-iron-sd JobId 433: Committing spooled data to Volume "PF6866". Despooling 430 bytes ... -22-Sep 02:30 bacula-iron-sd JobId 433: Despooling elapsed time = 00:00:01, Transfer rate = 430 Bytes/second -22-Sep 02:30 bacula-iron-sd JobId 433: Elapsed time=00:00:01, Transfer rate=0 Bytes/second -22-Sep 02:30 bacula-iron-sd JobId 433: Sending spooled attrs to the Director. Despooling 0 bytes ... -22-Sep 02:30 bacula-dir JobId 433: Bacula bacula-dir 9.4.2 (04Feb19): +29-Sep 02:29 bacula-dir JobId 447: Start Backup JobId 447, Job=Backup-Julio.2020-09-29_02.15.00_47 +29-Sep 02:29 bacula-dir JobId 447: Using Device "Drive-0-LTO-3" to write. +29-Sep 02:29 bacula-iron-sd JobId 447: Spooling data ... +29-Sep 02:29 bacula-iron-sd JobId 447: Committing spooled data to Volume "A02106". Despooling 430 bytes ... +29-Sep 02:29 bacula-iron-sd JobId 447: Despooling elapsed time = 00:00:01, Transfer rate = 430 Bytes/second +29-Sep 02:29 bacula-iron-sd JobId 447: Elapsed time=00:00:01, Transfer rate=0 Bytes/second +29-Sep 02:29 bacula-iron-sd JobId 447: Sending spooled attrs to the Director. Despooling 0 bytes ... +29-Sep 02:29 bacula-dir JobId 447: Bacula bacula-dir 9.4.2 (04Feb19): Build OS: x86_64-pc-linux-gnu ubuntu 20.04 - JobId: 433 - Job: Backup-Julio.2020-09-22_02.15.00_21 - Backup Level: Incremental, since=2020-09-15 02:26:09 + JobId: 447 + Job: Backup-Julio.2020-09-29_02.15.00_47 + Backup Level: Incremental, since=2020-09-22 02:30:44 Client: "Zinc-Client" 9.6.3 (09Mar20) amd64-portbld-freebsd11.3,freebsd,11.3-RELEASE-p8 FileSet: "Julio Backup" 2020-09-01 02:15:00 Pool: "Incr-Pool" (From Job IncPool override) Catalog: "MyCatalog" (From Client resource) Storage: "Iron-Autochanger" (From Pool resource) - Scheduled time: 22-Sep-2020 02:15:00 - Start time: 22-Sep-2020 02:30:44 - End time: 22-Sep-2020 02:30:47 + Scheduled time: 29-Sep-2020 02:15:00 + Start time: 29-Sep-2020 02:29:38 + End time: 29-Sep-2020 02:29:41 Elapsed time: 3 secs Priority: 10 FD Files Written: 0 @@ -31,18 +31,18 @@ Encryption: no Accurate: no Volume name(s): - Volume Session Id: 22 - Volume Session Time: 1599755230 - Last Volume Bytes: 334,008,428,544 (334.0 GB) + Volume Session Id: 9 + Volume Session Time: 1601284581 + Last Volume Bytes: 227,983,472,640 (227.9 GB) Non-fatal FD errors: 0 SD Errors: 0 FD termination status: OK SD termination status: OK - Termination: Backup O + Termination: Backup OK -22-Sep 02:30 bacula-dir JobId 433: Begin pruning Jobs older than 30 years . -22-Sep 02:30 bacula-dir JobId 433: No Jobs found to prune. -22-Sep 02:30 bacula-dir JobId 433: Begin pruning Files. -22-Sep 02:30 bacula-dir JobId 433: No Files found to prune. -22-Sep 02:30 bacula-dir JobId 433: End auto prune. +29-Sep 02:29 bacula-dir JobId 447: Begin pruning Jobs older than 30 years . +29-Sep 02:29 bacula-dir JobId 447: No Jobs found to prune. +29-Sep 02:29 bacula-dir JobId 447: Begin pruning Files. +29-Sep 02:29 bacula-dir JobId 447: No Files found to prune. +29-Sep 02:29 bacula-dir JobId 447: End auto prune. diff --git a/Dir Config/scripts/webhooks/RoboticsMail.md b/Dir Config/scripts/webhooks/RoboticsMail.md index f55c28d..ef03faa 100644 --- a/Dir Config/scripts/webhooks/RoboticsMail.md +++ b/Dir Config/scripts/webhooks/RoboticsMail.md @@ -1,48 +1,48 @@ -22-Sep 02:32 bacula-dir JobId 435: Start Backup JobId 435, Job=Backup-Robotics.2020-09-22_02.15.00_23 -22-Sep 02:32 bacula-dir JobId 435: Using Device "Drive-0-LTO-3" to write. -22-Sep 02:32 bacula-iron-sd JobId 435: Spooling data ... -22-Sep 02:33 bacula-iron-sd JobId 435: Committing spooled data to Volume "A02106". Despooling 50,889 bytes ... -22-Sep 02:33 bacula-iron-sd JobId 435: Despooling elapsed time = 00:00:01, Transfer rate = 50.88 K Bytes/second -22-Sep 02:33 bacula-iron-sd JobId 435: Elapsed time=00:00:08, Transfer rate=6.273 K Bytes/second -22-Sep 02:33 bacula-iron-sd JobId 435: Sending spooled attrs to the Director. Despooling 2,126 bytes ... -22-Sep 02:33 bacula-dir JobId 435: Bacula bacula-dir 9.4.2 (04Feb19): +29-Sep 02:34 bacula-dir JobId 450: Start Backup JobId 450, Job=Backup-Robotics.2020-09-29_02.15.00_50 +29-Sep 02:34 bacula-dir JobId 450: Using Device "Drive-1-LTO-3" to write. +29-Sep 02:34 bacula-iron-sd JobId 450: Spooling data ... +29-Sep 02:34 bacula-iron-sd JobId 450: Committing spooled data to Volume "PF6866". Despooling 14,575 bytes ... +29-Sep 02:34 bacula-iron-sd JobId 450: Despooling elapsed time = 00:00:01, Transfer rate = 14.57 K Bytes/second +29-Sep 02:34 bacula-iron-sd JobId 450: Elapsed time=00:00:09, Transfer rate=1.560 K Bytes/second +29-Sep 02:34 bacula-iron-sd JobId 450: Sending spooled attrs to the Director. Despooling 521 bytes ... +29-Sep 02:34 bacula-dir JobId 450: Bacula bacula-dir 9.4.2 (04Feb19): Build OS: x86_64-pc-linux-gnu ubuntu 20.04 - JobId: 435 - Job: Backup-Robotics.2020-09-22_02.15.00_23 - Backup Level: Incremental, since=2020-09-15 02:26:13 + JobId: 450 + Job: Backup-Robotics.2020-09-29_02.15.00_50 + Backup Level: Incremental, since=2020-09-22 02:32:54 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: 22-Sep-2020 02:15:00 - Start time: 22-Sep-2020 02:32:54 - End time: 22-Sep-2020 02:33:04 + Scheduled time: 29-Sep-2020 02:15:00 + Start time: 29-Sep-2020 02:34:38 + End time: 29-Sep-2020 02:34:48 Elapsed time: 10 secs Priority: 10 - FD Files Written: 10 - SD Files Written: 10 - FD Bytes Written: 48,903 (48.90 KB) - SD Bytes Written: 50,189 (50.18 KB) - Rate: 4.9 KB/s + FD Files Written: 2 + SD Files Written: 2 + FD Bytes Written: 13,746 (13.74 KB) + SD Bytes Written: 14,043 (14.04 KB) + Rate: 1.4 KB/s Software Compression: None - Comm Line Compression: 6.5% 1.1:1 + Comm Line Compression: 10.2% 1.1:1 Snapshot/VSS: no Encryption: no Accurate: no - Volume name(s): A02106 - Volume Session Id: 24 - Volume Session Time: 1599755230 - Last Volume Bytes: 226,753,164,288 (226.7 GB) + Volume name(s): PF6866 + Volume Session Id: 12 + Volume Session Time: 1601284581 + Last Volume Bytes: 419,425,090,560 (419.4 GB) Non-fatal FD errors: 0 SD Errors: 0 FD termination status: OK SD termination status: OK Termination: Backup OK -22-Sep 02:33 bacula-dir JobId 435: Begin pruning Jobs older than 30 years . -22-Sep 02:33 bacula-dir JobId 435: No Jobs found to prune. -22-Sep 02:33 bacula-dir JobId 435: Begin pruning Files. -22-Sep 02:33 bacula-dir JobId 435: No Files found to prune. -22-Sep 02:33 bacula-dir JobId 435: End auto prune. +29-Sep 02:34 bacula-dir JobId 450: Begin pruning Jobs older than 30 years . +29-Sep 02:34 bacula-dir JobId 450: No Jobs found to prune. +29-Sep 02:34 bacula-dir JobId 450: Begin pruning Files. +29-Sep 02:34 bacula-dir JobId 450: No Files found to prune. +29-Sep 02:34 bacula-dir JobId 450: End auto prune. diff --git a/Dir Config/scripts/webhooks/__pycache__/bathook.cpython-38.pyc b/Dir Config/scripts/webhooks/__pycache__/bathook.cpython-38.pyc index e29b3ae4553a231abf7d40719ae53aebca675ffe..9e40bce5b70a4afc76c8b95fe6e69111e03882b2 100644 GIT binary patch delta 29 jcmca0bySKsl$V!_0SIh#%Hr2-?^@9ljY0n2+ delta 40 ucmX>qbwP?Zl$V!_0SGqh