From 2bd54e59db4ad36f3bf516a2c0e52d6164e63ac4 Mon Sep 17 00:00:00 2001 From: Joe S <31870999+KenwoodFox@users.noreply.github.com> Date: Tue, 2 Jun 2020 16:30:11 -0400 Subject: [PATCH] Nice big changes here --- Dir Config/bacula-dir.conf | 8 +++- ...nt-other.conf => zinc-client-archive.conf} | 2 +- Dir Config/clients/zinc-client-system.conf | 1 + Dir Config/clients/zinc-client-users.conf | 1 + Dir Config/clients/zinc-client.conf | 8 ++-- Dir Config/filesets/filesets-archive.conf | 11 ++++++ Dir Config/filesets/filesets-system.conf | 24 ++++++++++++ .../filesets-users.conf} | 37 ------------------- Dir Config/pools.conf | 28 ++++++++++++-- Dir Config/{ => sample}/bacula-barcodes | 0 .../{ => sample}/bacula-dir.conf.backup | 0 Dir Config/{ => sample}/bacula-fd.conf.backup | 0 Dir Config/{ => sample}/bacula-sd.conf.backup | 0 .../{ => sample}/common_default_passwords | 0 Dir Config/schedules.conf | 4 +- Notes.md | 4 +- 16 files changed, 77 insertions(+), 51 deletions(-) rename Dir Config/clients/{zinc-client-other.conf => zinc-client-archive.conf} (87%) create mode 100644 Dir Config/clients/zinc-client-system.conf create mode 100644 Dir Config/filesets/filesets-archive.conf create mode 100644 Dir Config/filesets/filesets-system.conf rename Dir Config/{filesets.conf => filesets/filesets-users.conf} (65%) rename Dir Config/{ => sample}/bacula-barcodes (100%) rename Dir Config/{ => sample}/bacula-dir.conf.backup (100%) rename Dir Config/{ => sample}/bacula-fd.conf.backup (100%) rename Dir Config/{ => sample}/bacula-sd.conf.backup (100%) rename Dir Config/{ => sample}/common_default_passwords (100%) diff --git a/Dir Config/bacula-dir.conf b/Dir Config/bacula-dir.conf index a7d1d1e..54ccdaf 100644 --- a/Dir Config/bacula-dir.conf +++ b/Dir Config/bacula-dir.conf @@ -1,7 +1,10 @@ @/etc/bacula/clients/director-client.conf @/etc/bacula/clients/zinc-client.conf -@/etc/bacula/filesets.conf +@/etc/bacula/filesets/filesets-users.conf +@/etc/bacula/filesets/filesets-system.conf +@/etc/bacula/filesets/filesets-archive.conf + @/etc/bacula/schedules.conf @/etc/bacula/pools.conf @@ -82,7 +85,8 @@ messages { # Send mail just to me messages { # Send mail to me and dad name = MarksMail - mail = mws03@comcast.net,kenwood364@gmail.com = all, !skipped + #mail = mws03@comcast.net,kenwood364@gmail.com = all, !skipped + mail = kenwood364@gmail.com = all, !skipped console = all, !skipped, !saved } diff --git a/Dir Config/clients/zinc-client-other.conf b/Dir Config/clients/zinc-client-archive.conf similarity index 87% rename from Dir Config/clients/zinc-client-other.conf rename to Dir Config/clients/zinc-client-archive.conf index 5436d8d..d051208 100644 --- a/Dir Config/clients/zinc-client-other.conf +++ b/Dir Config/clients/zinc-client-archive.conf @@ -1,4 +1,4 @@ -# These are jobs run for vms, storage, archive, etc +# These are mainly jobs for archive. Job { # Archive Obelisk Name = "Archive-Obelisk" diff --git a/Dir Config/clients/zinc-client-system.conf b/Dir Config/clients/zinc-client-system.conf new file mode 100644 index 0000000..56d8d72 --- /dev/null +++ b/Dir Config/clients/zinc-client-system.conf @@ -0,0 +1 @@ +# These are jobs run for vms, storage, etc \ 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 e200dca..dea9743 100644 --- a/Dir Config/clients/zinc-client-users.conf +++ b/Dir Config/clients/zinc-client-users.conf @@ -63,6 +63,7 @@ Job { # Backup Michael Differential Backup Pool = Diff-Pool Incremental Backup Pool = Incr-Pool } + Job { # Backup Matthew Name = "Backup-Matthew" Client = Zinc-Client diff --git a/Dir Config/clients/zinc-client.conf b/Dir Config/clients/zinc-client.conf index ba2cb58..fdadb59 100644 --- a/Dir Config/clients/zinc-client.conf +++ b/Dir Config/clients/zinc-client.conf @@ -1,14 +1,14 @@ @/etc/bacula/clients/zinc-client-users.conf -@/etc/bacula/clients/zinc-client-other.conf - +@/etc/bacula/clients/zinc-client-system.conf +@/etc/bacula/clients/zinc-client-archive.conf Client { Name = Zinc-Client Password = "iamnotacrook" Address = 10.85.3.31 Catalog = MyCatalog - File Retention = 60 days # 60 days - Job Retention = 6 months # six months + File Retention = 6 months + Job Retention = 2 years AutoPrune = yes # Prune expired Jobs/Files } diff --git a/Dir Config/filesets/filesets-archive.conf b/Dir Config/filesets/filesets-archive.conf new file mode 100644 index 0000000..9be6222 --- /dev/null +++ b/Dir Config/filesets/filesets-archive.conf @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 0000000..88cb3a9 --- /dev/null +++ b/Dir Config/filesets/filesets-system.conf @@ -0,0 +1,24 @@ +# 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" + } +} diff --git a/Dir Config/filesets.conf b/Dir Config/filesets/filesets-users.conf similarity index 65% rename from Dir Config/filesets.conf rename to Dir Config/filesets/filesets-users.conf index 27fd90e..b180ce9 100644 --- a/Dir Config/filesets.conf +++ b/Dir Config/filesets/filesets-users.conf @@ -1,28 +1,3 @@ -# 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" @@ -86,15 +61,3 @@ FileSet { #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/pools.conf b/Dir Config/pools.conf index e80c41f..d73805e 100644 --- a/Dir Config/pools.conf +++ b/Dir Config/pools.conf @@ -1,9 +1,10 @@ Pool { Name = Full-Pool Pool Type = Backup - Recycle = yes - AutoPrune = yes - Volume Retention = 6 months + Recycle = yes # Allow these vols to be recycled + Recycle Pool = Scratch # Where to put the vol after recycling + AutoPrune = yes # Automaticly schedule for recycling + Volume Retention = 6 months # When to auto schedule for recycling Storage = Iron-Autochanger Maximum Volume Bytes = 800G @@ -16,6 +17,7 @@ Pool { Name = Diff-Pool Pool Type = Backup Recycle = yes + Recycle Pool = Scratch AutoPrune = yes Volume Retention = 2 months Storage = Iron-Autochanger @@ -30,6 +32,7 @@ Pool { Name = Incr-Pool Pool Type = Backup Recycle = yes + Recycle Pool = Scratch AutoPrune = yes Volume Retention = 1 month Storage = Iron-Autochanger @@ -51,4 +54,21 @@ Pool { Maximum Volume Bytes = 800G Cleaning Prefix = "CLN" -} \ No newline at end of file +} + +Pool { + # Magic name, volumes are taken from this pool + # when another pool fills up + Name = Scratch + Pool Type = Backup + # The following attributes are applied to the volume when first + # labelled, and don't update automatically as the volume + # moves between pools. + + # Allow this volume to be recycled + Recycle = yes + + # When the volume is recycled, return it automatically to + # this pool + Recycle Pool = Scratch +} diff --git a/Dir Config/bacula-barcodes b/Dir Config/sample/bacula-barcodes similarity index 100% rename from Dir Config/bacula-barcodes rename to Dir Config/sample/bacula-barcodes diff --git a/Dir Config/bacula-dir.conf.backup b/Dir Config/sample/bacula-dir.conf.backup similarity index 100% rename from Dir Config/bacula-dir.conf.backup rename to Dir Config/sample/bacula-dir.conf.backup diff --git a/Dir Config/bacula-fd.conf.backup b/Dir Config/sample/bacula-fd.conf.backup similarity index 100% rename from Dir Config/bacula-fd.conf.backup rename to Dir Config/sample/bacula-fd.conf.backup diff --git a/Dir Config/bacula-sd.conf.backup b/Dir Config/sample/bacula-sd.conf.backup similarity index 100% rename from Dir Config/bacula-sd.conf.backup rename to Dir Config/sample/bacula-sd.conf.backup diff --git a/Dir Config/common_default_passwords b/Dir Config/sample/common_default_passwords similarity index 100% rename from Dir Config/common_default_passwords rename to Dir Config/sample/common_default_passwords diff --git a/Dir Config/schedules.conf b/Dir Config/schedules.conf index 1c5013c..27526c3 100644 --- a/Dir Config/schedules.conf +++ b/Dir Config/schedules.conf @@ -13,7 +13,7 @@ Schedule { Run = Level=Differential nov 1st sun at 4:15 Run = Level=Differential dec 1st sun at 4:15 - Run = Level=Incremental tue at 2:15 + #Run = Level=Incremental tue at 2:15 Run = Level=Incremental sat at 2:15 } @@ -32,6 +32,6 @@ Schedule { Run = Level=Differential nov 1st sun at 4:30 Run = Level=Differential dec 1st sun at 4:30 - Run = Level=Incremental tue at 2:30 + #Run = Level=Incremental tue at 2:30 Run = Level=Incremental sat at 2:30 } diff --git a/Notes.md b/Notes.md index 4138b1b..d8e965b 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=19,20,21,22,23,24,25,26,27,28,29 barcodes +*label pool=Scratch storage=Iron-Autochanger slots=17,18,19,20,21,22,23,24,25,26 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" @@ -29,3 +29,5 @@ libraries have slots, that command says "load the tape from slot 1 into the driv Do my incremental, difs and fulls have to line up? is that the way to do it? << I keep each successive level for longer than the interval of the parent level. e.g. if I take monthly fulls, weekly diffs, and daily incrementals, I would retain the incrementals for at least 5 weeks, and incrementals for at least 10 days also for each level, make sure you are retaining volumes for longer than the interval. If you had monthly fulls in a 30-day pool, you would only be keeping one backup at a time. and if the most recent backup failed (e.g. network interruptionm, server crash) then you no longer have any viable backups +Todo for major name-change +Purge all volumes in pools that have that name \ No newline at end of file