Build 13.0.3

This commit is contained in:
Eduardo Fraga
2023-08-23 07:33:42 -03:00
commit 95a1b068b1
70 changed files with 5420 additions and 0 deletions

View File

@@ -0,0 +1,418 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: bacula-dir
namespace: backup
data:
bacula-dir.conf: |-
#
# 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.4 (28 May 2019) -- redhat Enterprise release
#
# 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 = "/opt/bacula/scripts/query.sql"
WorkingDirectory = "/opt/bacula/working"
PidDirectory = "/opt/bacula/working"
Maximum Concurrent Jobs = 20
Password = "XDnaVZYU9F4QhqUGMPxiOXsJaji23mNG3FaAM9Z2q1c/" # Console password
Messages = Daemon
}
#
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 = "/opt/bacula/working/%c.bsr"
}
#
# Define the main nightly save backup job
# By default, this job will back up to disk in /tmp
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
}
#
# 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 <catalog-name>
ClientRunBeforeJob = "/opt/bacula/scripts/make_catalog_backup.pl MyCatalog"
# This deletes the copy of the catalog
ClientRunAfterJob = "/opt/bacula/scripts/delete_catalog_backup"
Write Bootstrap = "/opt/bacula/working/%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 = /tmp/bacula-restores
}
# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
File = /opt/bacula/bin
File = /opt/bacula
File = /opt/bacula/etc
}
#
#
# If you backup the root directory, the following two excluded
# files can be useful
#
Exclude {
File = /opt/bacula/working
File = /tmp
File = /proc
File = /tmp
File = /sys
File = /.journal
File = /.fsck
}
}
#
#
# When to do the backups, full backup on first sunday of the month,
# differential (i.e. incremental since full) every other sunday,
# and incremental backups other days
Schedule {
Name = "WeeklyCycle"
Run = Full 1st sun at 23:05
Run = Differential 2nd-5th sun at 23:05
Run = Incremental mon-sat at 23:05
}
#
# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}
#
# This is the backup of the catalog
FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = "/opt/bacula/working/bacula.sql"
}
}
# Client (File Services) to backup
Client {
Name = bacula-fd
Address = bacula-fd
FDPort = 9102
Catalog = MyCatalog
Password = "eso80TrxzhXkRgaQVI6ZYrSzAZ4E9KFNp0Y+T1HHVWBi" # password for FileDaemon
File Retention = 60 days # 60 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
#
# Definition of file Virtual Autochanger device
Autochanger {
Name = File1
# Do not use "localhost" here
Address = bacula-sd # N.B. Use a fully qualified name here
SDPort = 9103
Password = "TS8EQJ99iLFSK39oJy33YqkZ98v4ZapjRcA+j1N6ED1n"
Device = FileChgr1
Media Type = File1
Maximum Concurrent Jobs = 10 # run up to 10 jobs a the same time
Autochanger = File1 # point to ourself
}
# Definition of a second file Virtual Autochanger device
# Possibly pointing to a different disk drive
Autochanger {
Name = File2
# Do not use "localhost" here
Address = bacula-sd # N.B. Use a fully qualified name here
SDPort = 9103
Password = "TS8EQJ99iLFSK39oJy33YqkZ98v4ZapjRcA+j1N6ED1n"
Device = FileChgr2
Media Type = File2
Autochanger = File2 # point to ourself
Maximum Concurrent Jobs = 10 # run up to 10 jobs a the same time
}
# Generic catalog service
Catalog {
Name = MyCatalog
dbname = "bacula"
dbuser = "bacula"
dbpassword = "bacula"
DB address = "postgresql-headless.backup.svc.cluster.local"
}
# Reasonable message delivery -- send most everything to email address
# and to the console
Messages {
Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
# to replace the %r in the from field (-f part) with a single valid
# email address in both the mailcommand and the operatorcommand.
# What this does is, it sets the email address that emails would display
# in the FROM field, which is by default the same email as they're being
# sent to. However, if you send email to more than one address, then
# you'll have to set the FROM address manually, to a single address.
# for example, a 'no-reply@mydomain.com', is better since that tends to
# tell (most) people that its coming from an automated source.
#
# mailcommand = "/opt/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
# operatorcommand = "/opt/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
# mail = root@localhost = all, !skipped
# operator = root@localhost = 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 = "/opt/bacula/log/bacula.log" = all, !skipped
stdout = all, !skipped
catalog = all
# Telegram
# mailcommand = "/opt/bacula/bin/bsmtp -h smtp2tg -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
# mail = eduardo@smtp2tg = all, !skipped
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
# mailcommand = "/opt/bacula/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
# mail = root@localhost = all, !skipped
console = all, !skipped, !saved
stdout = all, !skipped
# append = "/opt/bacula/log/bacula.log" = all, !skipped
# Telegram
# mailcommand = "/opt/bacula/bin/bsmtp -h smtp2tg -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
# mail = eduardo@smtp2tg = 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 = "r0V/Hx0TUwQ4TlnX1lyUHf8J8v9XvRBqnHTRW9+CB614"
CommandACL = status, .status
}
# Include subfiles associated with configuration of clients.
# # They define the bulk of the Clients, Jobs, and FileSets.
# # Remember to "reload" the Director after adding a client file.
@|"sh -c 'for f in /opt/bacula/etc/bacula-dir.d/*.conf ; do echo @${f} ; done'"
#
# bacula-dir-cloud-aws.conf
#
# JobDefs
# Job
# Restore
# Pool
# Autochanger
#
# Template to store in cloud
JobDefs {
Name = "DefaultJobToCloudAWS"
Type = Backup
Level = Incremental
Client = bacula-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = "CloudS3AWS"
Messages = Standard
Pool = CloudAWS
SpoolAttributes = yes
Priority = 10
Write Bootstrap = "/opt/bacula/working/%c.bsr"
}
# Jobs
Job {
Name = "BackupClient1ToCloudAWS"
JobDefs = "DefaultJobToCloudAWS"
}
# Restore
Job {
Name = "RestoreFromCloudAWS"
Type = Restore
Client=bacula-fd
Storage = CloudS3AWS
FileSet="Full Set"
Pool = CloudAWS
Messages = Standard
Where = /tmp/bacula-restores
}
# Cloud Pool definition
Pool {
Name = CloudAWS
Pool Type = Backup
Recycle = no # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Maximum Volume Jobs = 1 #
# Maximum Volume Bytes = 100M # Limit Volume size to something reasonable
Label Format = "Vol-JobId-${JobId}" # Auto label
}
# Autochanger definition
Autochanger {
Name = "CloudS3AWS"
# Do not use "localhost" here
Address = bacula-sd # N.B. Use a fully qualified name here
SDPort = 9103
Password = "TS8EQJ99iLFSK39oJy33YqkZ98v4ZapjRcA+j1N6ED1n"
Device = "CloudAutoChangerS3"
Media Type = "CloudType"
Maximum Concurrent Jobs = 10 # run up to 10 jobs a the same time
}
# bacula-dir-cloud.conf
#
# JobDefs
# Job
# Restore
# Pool
# Autochanger
#
# Template to store in cloud
JobDefs {
Name = "DefaultJobToCloud"
Type = Backup
Level = Incremental
Client = bacula-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = "CloudS3"
Messages = Standard
Pool = Cloud
SpoolAttributes = yes
Priority = 10
Write Bootstrap = "/opt/bacula/working/%c.bsr"
}
# Jobs
Job {
Name = "BackupClient1ToCloud"
JobDefs = "DefaultJobToCloud"
}
# Restore
Job {
Name = "RestoreFromCloud"
Type = Restore
Client=bacula-fd
Storage = CloudS3
FileSet="Full Set"
Pool = Cloud
Messages = Standard
Where = /tmp/bacula-restores
}
# Cloud Pool definition
Pool {
Name = Cloud
Pool Type = Backup
Recycle = no # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Maximum Volume Jobs = 1 #
# Maximum Volume Bytes = 100M # Limit Volume size to something reasonable
Label Format = "Vol-JobId-${JobId}" # Auto label
}
# Autochanger definition
Autochanger {
Name = "CloudS3"
# Do not use "localhost" here
Address = bacula-sd # N.B. Use a fully qualified name here
SDPort = 9103
Password = "TS8EQJ99iLFSK39oJy33YqkZ98v4ZapjRcA+j1N6ED1n"
Device = "CloudAutoChanger1"
Media Type = "CloudType"
Maximum Concurrent Jobs = 10 # run up to 10 jobs a the same time
}
#
#Autochanger {
# Name = "CloudS3-2"
## Do not use "localhost" here
# Address = bacula-sd # N.B. Use a fully qualified name here
# SDPort = 9103
# Password = "TS8EQJ99iLFSK39oJy33YqkZ98v4ZapjRcA+j1N6ED1n"
# Device = "CloudAutoChanger2"
# Media Type = "CloudType"
# Maximum Concurrent Jobs = 10 # run up to 10 jobs a the same time
#}
#
#Autochanger {
# Name = "CloudS3-3"
## Do not use "localhost" here
# Address = bacula-sd # N.B. Use a fully qualified name here
# SDPort = 9103
# Password = "TS8EQJ99iLFSK39oJy33YqkZ98v4ZapjRcA+j1N6ED1n"
# Device = "CloudAutoChanger3"
# Media Type = "CloudType"
# Maximum Concurrent Jobs = 10 # run up to 10 jobs a the same time
#}
#

View File

@@ -0,0 +1,54 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: bacula-fd
namespace: backup
data:
bacula-fd.conf: |-
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 9.4.4 (28 May 2019) -- redhat Enterprise release
#
# 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 = "eso80TrxzhXkRgaQVI6ZYrSzAZ4E9KFNp0Y+T1HHVWBi"
}
#
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = bacula-mon
Password = "nm6na6cCh3NymDV6JteWL0Fir71A5uhrdRjmnRKjnHn5"
Monitor = yes
}
#
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = bacula-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /opt/bacula/working
Pid Directory = /opt/bacula/working
Maximum Concurrent Jobs = 20
Plugin Directory = /opt/bacula/plugins
}
#
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = bacula-dir = all, !skipped, !restored
}

View File

@@ -0,0 +1,530 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: bacula-sd
namespace: backup
data:
bacula-sd.conf: |-
#
# Default Bacula Storage Daemon Configuration file
#
# For Bacula release 9.4.4 (28 May 2019) -- redhat Enterprise release
#
# 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 = "/opt/bacula/working"
Pid Directory = "/opt/bacula/working"
Plugin Directory = "/opt/bacula/plugins"
Maximum Concurrent Jobs = 20
}
#
# List Directors who are permitted to contact Storage daemon
#
Director {
Name = bacula-dir
Password = "TS8EQJ99iLFSK39oJy33YqkZ98v4ZapjRcA+j1N6ED1n"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the storage daemon
#
Director {
Name = bacula-mon
Password = "5p+emSGBrRv7sdsOJjlXxOjIDIzvivTLzY8ywWCjz02x"
Monitor = yes
}
#
# Note, for a list of additional Device templates please
# see the directory <bacula-source>/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 = /tmp
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 = /tmp
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 = /tmp
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 = /tmp
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 = "/opt/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 = "/opt/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 = "/opt/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 = "/opt/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 = "/opt/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 = "/opt/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 = "/opt/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 = "/opt/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 = "/opt/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
}
# # Include bacula-sd-wasabi.conf for Wasabi Cloud provider
# @/opt/bacula/etc/bacula-sd-wasabi.conf
#
# # Include bacula-sd-s3.conf for AWS S3 Cloud provider
# @/opt/bacula/etc/bacula-sd-s3.conf
#
# Define a virtual autochanger for Wasabi Cloud
#
# CloudStorage1 => us-east-2
# CloudStorage2 => eu-central-1
# CloudStorage3 => us-west-1
#
# Change AccessKey and SecretKey on Cloud resource
#
# Autochangers
Autochanger {
Name = "CloudAutoChanger1"
Device = CloudStorage1
Changer Command = ""
Changer Device = /dev/null
}
#
#Autochanger {
# Name = "CloudAutoChanger2"
# Device = CloudStorage2
# Changer Command = ""
# Changer Device = /dev/null
#}
#
#Autochanger {
# Name = "CloudAutoChanger3"
# Device = CloudStorage3
# Changer Command = ""
# Changer Device = /dev/null
#}
#
# Devices
Device {
Name = "CloudStorage1"
Device Type = "Cloud"
Cloud = "WasabiS3-cloud-us-east-2"
Maximum Part Size = 2M
Maximum File Size = 2M
Media Type = "CloudType"
Archive Device = "/tmp"
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
}
#
#Device {
# Name = "CloudStorage2"
# Device Type = "Cloud"
# Cloud = "WasabiS3-cloud-eu-central-1"
# Maximum Part Size = 2M
# Maximum File Size = 2M
# Media Type = "CloudType"
# Archive Device = "/tmp"
# LabelMedia = yes
# Random Access = yes
# AutomaticMount = yes
# RemovableMedia = no
# AlwaysOpen = no
#}
#
#
#Device {
# Name = "CloudStorage3"
# Device Type = "Cloud"
# Cloud = "WasabiS3-cloud-us-west-1"
# Maximum Part Size = 2M
# Maximum File Size = 2M
# Media Type = "CloudType"
# Archive Device = "/tmp"
# LabelMedia = yes
# Random Access = yes
# AutomaticMount = yes
# RemovableMedia = no
# AlwaysOpen = no
#}
#
# Cloud providers
Cloud {
Name = "WasabiS3-cloud-us-east-2"
Driver = "S3"
HostName = "s3.us-east-2.wasabisys.com"
BucketName = "eftechcombr-backup"
AccessKey = "ABC"
SecretKey = "DEF"
Protocol = HTTPS
UriStyle = "VirtualHost"
Truncate Cache = "AfterUpload"
Upload = "EachPart"
MaximumUploadBandwidth = 10MB/s
}
#
#Cloud {
# Name = "WasabiS3-cloud-eu-central-1"
# Driver = "S3"
# HostName = "s3.eu-central-1.wasabisys.com"
# BucketName = "eftechcombr-backup2"
# AccessKey = "ABC"
# SecretKey = "DEF"
# Protocol = HTTPS
# UriStyle = "VirtualHost"
# Truncate Cache = "AfterUpload"
# Upload = "EachPart"
# MaximumUploadBandwidth = 10MB/s
#}
#Cloud {
# Name = "WasabiS3-cloud-us-west-1"
# Driver = "S3"
# HostName = "s3.us-west-1.wasabisys.com"
# BucketName = "eftechcombr-backup3"
# AccessKey = "ABC"
# SecretKey = "DEF"
# Protocol = HTTPS
# UriStyle = "VirtualHost"
# Truncate Cache = "AfterUpload"
# Upload = "EachPart"
# MaximumUploadBandwidth = 10MB/s
#}
#
# Define a virtual autochanger for AWS S3
#
# Change AccessKey and SecretKey on Cloud resource
#
# Autochangers
Autochanger {
Name = "CloudAutoChangerS3"
Device = CloudStorageS3
Changer Command = ""
Changer Device = /dev/null
}
# Devices
Device {
Name = "CloudStorageS3"
Device Type = "Cloud"
Cloud = "S3-cloud-us-west-2"
Maximum Part Size = 2M
Maximum File Size = 2M
Media Type = "CloudType"
Archive Device = "/tmp"
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
}
# Cloud providers
# Hostname see https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
Cloud {
Name = "S3-cloud-us-west-2"
Driver = "S3"
HostName = "s3.us-west-2.amazonaws.com"
BucketName = "eftechcombr-bacula"
AccessKey = "AKIA33MZDCX3OLN7A6DD"
SecretKey = "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"
Protocol = HTTPS
UriStyle = "VirtualHost"
Truncate Cache = "AfterUpload"
Upload = "EachPart"
Region = "us-west-2"
MaximumUploadBandwidth = 10MB/s
}
#
#

View File

@@ -0,0 +1,47 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: baculum-api
namespace: backup
data:
baculum.users: |-
admin:YWG41BPzVAkN6
api.conf: |-
[api]
auth_type = "basic"
debug = "0"
lang = "en"
[db]
enabled = "1"
type = "pgsql"
name = "bacula"
login = "bacula"
password = "bacula"
ip_addr = "postgresql-headless"
port = "5432"
path = ""
[bconsole]
enabled = "1"
bin_path = "/opt/bacula/bin/bconsole"
cfg_path = "/opt/bacula/etc/bconsole.conf"
use_sudo = "0"
[jsontools]
enabled = "1"
use_sudo = "0"
bconfig_dir = "/etc/baculum/"
bdirjson_path = "/opt/bacula/bin/bdirjson"
dir_cfg_path = "/opt/bacula/etc/bacula-dir.conf"
bsdjson_path = "/opt/bacula/bin/bsdjson"
sd_cfg_path = "/opt/bacula/etc/bacula-sd.conf"
bfdjson_path = "/opt/bacula/bin/bfdjson"
fd_cfg_path = "/opt/bacula/etc/bacula-fd.conf"
bbconsjson_path = "/opt/bacula/bin/bbconsjson"
bcons_cfg_path = "/opt/bacula/etc/bconsole.conf"

View File

@@ -0,0 +1,58 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: baculum-web
namespace: backup
data:
baculum.users: |-
admin:YWG41BPzVAkN6
hosts.conf: |-
[Main]
auth_type = "basic"
login = "admin"
password = "admin"
client_id = ""
client_secret = ""
redirect_uri = ""
scope = ""
protocol = "http"
address = "baculum-api"
port = "9096"
url_prefix = ""
settings.conf: |-
[baculum]
debug = "0"
lang = "en"
max_jobs = "15000"
size_values_unit = "decimal"
time_in_job_log = "0"
date_time_format = "Y-M-D R"
enable_messages_log = "1"
login = "admin"
[users]
[auth_basic]
allow_manage_users = "1"
user_file = "/etc/baculum/Config-web-apache/baculum.users"
hash_alg = "apr-md5"
[security]
auth_method = "basic"
def_access = "default_settings"
def_role = "normal"
def_api_host = "Main"
users.conf: |-
[admin]
long_name = ""
description = ""
email = ""
roles = "admin"
api_hosts = ""
enabled = "1"
ips = ""

View File

@@ -0,0 +1,20 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: bconsole
namespace: backup
data:
bconsole.conf: |-
#
# Bacula User Agent (or Console) Configuration File
#
# Copyright (C) 2000-2015 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
#
Director {
Name = bacula-dir
DIRport = 9101
address = bacula-dir
Password = "XDnaVZYU9F4QhqUGMPxiOXsJaji23mNG3FaAM9Z2q1c/"
}

View File

@@ -0,0 +1,69 @@
###############################################################################
#
###############################################################################
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: bacula-dir
name: bacula-dir
namespace: backup
spec:
replicas: 1
selector:
matchLabels:
app: bacula-dir
strategy: {}
template:
metadata:
labels:
app: bacula-dir
spec:
containers:
- image: docker.io/eftechcombr/bacula:13.0.3-director
name: bacula-dir
ports:
- containerPort: 9101
volumeMounts:
- name: bacula-dir
mountPath: "/opt/bacula/etc/bacula-dir.conf"
subPath: bacula-dir.conf
readOnly: true
- name: bconsole
mountPath: "/opt/bacula/etc/bconsole.conf"
subPath: bconsole.conf
readOnly: true
resources: {}
volumes:
- name: bacula-dir
configMap:
name: bacula-dir
- name: bconsole
configMap:
name: bconsole
status: {}
###############################################################################
#
###############################################################################
---
apiVersion: v1
kind: Service
metadata:
labels:
app: bacula-dir
name: bacula-dir
namespace: backup
spec:
ports:
- port: 9101
protocol: TCP
targetPort: 9101
selector:
app: bacula-dir
status:
loadBalancer: {}

View File

@@ -0,0 +1,54 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: bacula-fd
name: bacula-fd
namespace: backup
spec:
replicas: 1
selector:
matchLabels:
app: bacula-fd
strategy: {}
template:
metadata:
labels:
app: bacula-fd
spec:
containers:
- image: docker.io/eftechcombr/bacula:13.0.3-client
name: bacula-fd
ports:
- containerPort: 9102
volumeMounts:
- name: bacula-fd
mountPath: "/opt/bacula/etc"
readOnly: true
resources: {}
volumes:
- name: bacula-fd
configMap:
name: bacula-fd
status: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
app: bacula-fd
name: bacula-fd
namespace: backup
spec:
ports:
- port: 9102
protocol: TCP
targetPort: 9102
selector:
app: bacula-fd
status:
loadBalancer: {}

View File

@@ -0,0 +1,54 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: bacula-sd
name: bacula-sd
namespace: backup
spec:
replicas: 1
selector:
matchLabels:
app: bacula-sd
strategy: {}
template:
metadata:
labels:
app: bacula-sd
spec:
containers:
- image: docker.io/eftechcombr/bacula:13.0.3-storage
name: bacula-sd
ports:
- containerPort: 9103
volumeMounts:
- name: bacula-sd
mountPath: "/opt/bacula/etc"
readOnly: true
resources: {}
volumes:
- name: bacula-sd
configMap:
name: bacula-sd
status: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
app: bacula-sd
name: bacula-sd
namespace: backup
spec:
ports:
- port: 9103
protocol: TCP
targetPort: 9103
selector:
app: bacula-sd
status:
loadBalancer: {}

View File

@@ -0,0 +1,97 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: baculum-api
name: baculum-api
namespace: backup
spec:
replicas: 1
selector:
matchLabels:
app: baculum-api
strategy: {}
template:
metadata:
labels:
app: baculum-api
spec:
initContainers:
- image: docker.io/eftechcombr/baculum:11.0.6-api
name: baculum-init
volumeMounts:
- name: baculum-api
mountPath: "/tmp/baculum/Config-api-apache"
readOnly: true
- name: etc-baculum-api
mountPath: "/etc/baculum"
command:
- bash
- -c
- "cp -Rf /tmp/baculum/Config-api-apache /etc/baculum && chmod a+w /etc/baculum/Config-api-apache"
containers:
- image: docker.io/eftechcombr/baculum:11.0.6-api
name: baculum-api
ports:
- containerPort: 9096
volumeMounts:
- name: etc-baculum-api
mountPath: "/etc/baculum"
- name: bconsole
mountPath: "/opt/bacula/etc/bconsole.conf"
subPath: bconsole.conf
readOnly: true
- name: bacula-dir
mountPath: "/opt/bacula/etc/bacula-dir.conf"
subPath: bacula-dir.conf
readOnly: true
- name: bacula-fd
mountPath: "/opt/bacula/etc/bacula-fd.conf"
subPath: bacula-fd.conf
readOnly: true
- name: bacula-sd
mountPath: "/opt/bacula/etc/bacula-sd.conf"
subPath: bacula-sd.conf
readOnly: true
resources: {}
volumes:
- name: bacula-sd
configMap:
name: bacula-sd
- name: bacula-dir
configMap:
name: bacula-dir
- name: bacula-fd
configMap:
name: bacula-fd
- name: baculum-api
configMap:
name: baculum-api
- name: bconsole
configMap:
name: bconsole
- name: etc-baculum-api
emptyDir: {}
status: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
app: baculum-api
name: baculum-api
namespace: backup
spec:
ports:
- port: 9096
protocol: TCP
targetPort: 9096
selector:
app: baculum-api
status:
loadBalancer: {}

View File

@@ -0,0 +1,71 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: baculum-web
name: baculum-web
namespace: backup
spec:
replicas: 1
selector:
matchLabels:
app: baculum-web
strategy: {}
template:
metadata:
labels:
app: baculum-web
spec:
initContainers:
- image: docker.io/eftechcombr/baculum:11.0.6-web
name: baculum-init
volumeMounts:
- name: baculum-web
mountPath: "/tmp/baculum/Config-web-apache"
readOnly: true
- name: etc-baculum-web
mountPath: "/etc/baculum"
command:
- bash
- -c
- "cp -Rf /tmp/baculum/Config-web-apache /etc/baculum && chmod a+w /etc/baculum/Config-web-apache"
containers:
- image: docker.io/eftechcombr/baculum:11.0.6-web
name: baculum-web
ports:
- containerPort: 9095
volumeMounts:
- name: etc-baculum-web
mountPath: "/etc/baculum"
resources: {}
volumes:
- name: baculum-web
configMap:
name: baculum-web
- name: etc-baculum-web
emptyDir: {}
status: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
app: baculum-web
name: baculum-web
namespace: backup
spec:
ports:
- port: 9095
protocol: TCP
targetPort: 9095
selector:
app: baculum-web
status:
loadBalancer: {}

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
kubernetes.io/metadata.name: backup
name: backup

View File

@@ -0,0 +1,139 @@
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app.kubernetes.io/component: primary
app.kubernetes.io/instance: backup
app.kubernetes.io/name: postgresql
name: postgresql
namespace: backup
spec:
podManagementPolicy: OrderedReady
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/instance: backup
app.kubernetes.io/name: postgresql
role: primary
serviceName: postgresql-headless
template:
metadata:
labels:
app.kubernetes.io/component: primary
app.kubernetes.io/instance: backup
app.kubernetes.io/name: postgresql
role: primary
name: postgresql
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/component: primary
app.kubernetes.io/instance: backup
app.kubernetes.io/name: postgresql
namespaces:
- backup
topologyKey: kubernetes.io/hostname
weight: 1
containers:
- env:
- name: POSTGRES_PASSWORD
value: "bacula"
- name: POSTGRES_USER
value: "bacula"
- name: POSTGRES_DB
value: "bacula"
- name: POSTGRES_INITDB_ARGS
value: '--encoding=SQL_ASCII --lc-collate=C --lc-ctype=C'
image: docker.io/eftechcombr/bacula:13.0.3-catalog
imagePullPolicy: IfNotPresent
name: postgresql
ports:
- containerPort: 5432
name: tcp-postgresql
protocol: TCP
resources:
requests:
cpu: 250m
memory: 256Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: data
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- emptyDir:
name: data
updateStrategy:
type: RollingUpdate
status:
replicas: 1
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/instance: backup
app.kubernetes.io/name: postgresql
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
name: postgresql-headless
namespace: backup
spec:
clusterIP: None
clusterIPs:
- None
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: tcp-postgresql
port: 5432
protocol: TCP
targetPort: tcp-postgresql
publishNotReadyAddresses: true
selector:
app.kubernetes.io/instance: backup
app.kubernetes.io/name: postgresql
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
meta.helm.sh/release-name: backup
meta.helm.sh/release-namespace: backup
labels:
app.kubernetes.io/instance: backup
app.kubernetes.io/name: postgresql
name: postgresql
namespace: backup
spec:
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: tcp-postgresql
port: 5432
protocol: TCP
targetPort: tcp-postgresql
selector:
app.kubernetes.io/instance: backup
app.kubernetes.io/name: postgresql
role: primary
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}