Last active
March 14, 2016 15:32
-
-
Save dlangille/5ff5002d07f68a516507 to your computer and use it in GitHub Desktop.
Bacula virtual disk configuration, based on http://blog.bacula.org/whitepapers/CommunityDiskBackup.pdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Director { | |
Name = bacula-dir | |
DIRport = 9101 | |
QueryFile = "/usr/local/share/bacula/query.sql" | |
WorkingDirectory = "/usr/local/bacula/working" | |
PidDirectory = "/var/run" | |
# I use 7 because: 5 drives, + restore drive, plus bconsole & bacula-dir connections | |
# read the docs for bacula-dir, bacula-fd, and bacula-sd about this. | |
# My comments are vague here... sorry. | |
# | |
Maximum Concurrent Jobs = 7 | |
Password = "Right,MyPassword" | |
Messages = Standard | |
TLS Enable = yes | |
TLS Require = no | |
TLS Verify Peer = yes | |
TLS Allowed CN = "bacula.int.unixathome.org" | |
TLS CA Certificate File = /usr/local/bacula/certificates/ca.crt | |
TLS Certificate = /usr/local/bacula/certificates/client.crt | |
TLS Key = /usr/local/bacula/certificates/client.key | |
} | |
Storage { | |
Name = CreyFile | |
Address = crey.int.unixathome.org # N.B. Use a fully qualified name here | |
SDPort = 9103 | |
Password = "MySDPassWord" | |
AutoChanger = Yes | |
# this is the Device you want to specify. Call it anything you want, but make sure it | |
# matches the name of the Autochanger you want to use from bacula-sd.conf (around line 52). | |
Device = VirtualDisk | |
Media Type = File | |
Maximum Concurrent Jobs = 7 | |
} | |
# for restoring | |
Storage { | |
Name = CreyFileRestore | |
Address = crey.int.unixathome.org # N.B. Use a fully qualified name here | |
SDPort = 9103 | |
Password = "MySDPassWord" | |
Device = Restore-Drive | |
Media Type = File | |
Maximum Concurrent Jobs = 2 | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client { | |
Name = supernews-fd | |
Address = supernews.example.org | |
FDPort = 9102 | |
Catalog = MyCatalog | |
Password = "TheFDPassword" | |
# see http://www.bacula.org/7.4.x-manuals/en/main/Client_File_daemon_Configur.html | |
# Maximum Concurrent Jobs = number | |
# where number is the maximum number of Jobs that should run concurrently. | |
# The default is set to 2, but you may set it to a larger number. Each contact from the | |
# Director (e.g. status request, job start request) is considered as a Job, so if you want | |
# to be able to do a status request in the console at the same time as a Job is running, you | |
# will need to set this value greater than 1. | |
Maximum Concurrent Jobs = 3 | |
TLS Require = yes | |
TLS Enable = yes | |
TLS CA Certificate File = /usr/local/bacula/certificates/ca.crt | |
TLS Certificate = /usr/local/bacula/certificates/client.crt | |
TLS Key = /usr/local/bacula/certificates/client.key | |
File Retention = 3 years | |
Job Retention = 3 years | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Storage { # definition of myself | |
Name = crey-sd | |
WorkingDirectory = "/usr/local/bacula/working" | |
Pid Directory = "/var/run" | |
Maximum Concurrent Jobs = 20 | |
TLS Enable = yes | |
TLS Verify Peer = yes | |
TLS CA Certificate File = /usr/local/etc/ssl/ca.pem | |
TLS Certificate = /usr/local/etc/ssl/crey.int.unixathome.org.crt | |
TLS Key = /usr/local/etc/ssl/crey.int.unixathome.org.nopassword.key | |
} | |
# | |
# List Directors who are permitted to contact Storage daemon | |
# | |
Director { | |
Name = bacula-dir | |
Password = "MySDPassWord" | |
} | |
# | |
# Note, for a list of additional Device templates please | |
# see the directory <bacula-source>/examples/devices | |
# Or follow the following link: | |
# http://bacula.svn.sourceforge.net/viewvc/bacula/trunk/bacula/examples/devices/ | |
# | |
# | |
# Devices supported by this Storage daemon | |
# To connect, the Director's bacula-dir.conf must have the | |
# same Name and MediaType. | |
# | |
Device { | |
Name = Restore-Drive | |
Media Type = File | |
Archive Device = /usr/local/bacula/volumes | |
LabelMedia = yes | |
Random Access = yes | |
AutomaticMount = yes | |
RemovableMedia = no | |
AlwaysOpen = no | |
Maximum Concurrent Jobs = 2 | |
Volume Poll Interval = 15 | |
} | |
Autochanger { | |
Name = VirtualDisk | |
Changer Device = /dev/null | |
Changer Command = /dev/null | |
Device = vDrive-0, vDrive-1, vDrive-2, vDrive-3, vDrive-4 | |
} | |
Device { | |
Name = vDrive-0 | |
Media Type = File | |
Archive Device = /usr/local/bacula/volumes | |
LabelMedia = yes | |
Random Access = yes | |
AutomaticMount = yes | |
RemovableMedia = no | |
AlwaysOpen = no | |
Autochanger = yes | |
Drive Index = 0 | |
Maximum Concurrent Jobs = 1 | |
Volume Poll Interval = 15 | |
} | |
Device { | |
Name = vDrive-1 | |
Media Type = File | |
Archive Device = /usr/local/bacula/volumes | |
LabelMedia = yes | |
Random Access = yes | |
AutomaticMount = yes | |
RemovableMedia = no | |
AlwaysOpen = no | |
Autochanger = yes | |
Drive Index = 1 | |
Maximum Concurrent Jobs = 1 | |
Volume Poll Interval = 15 | |
} | |
Device { | |
Name = vDrive-2 | |
Media Type = File | |
Archive Device = /usr/local/bacula/volumes | |
LabelMedia = yes | |
Random Access = yes | |
AutomaticMount = yes | |
RemovableMedia = no | |
AlwaysOpen = no | |
Autochanger = yes | |
Drive Index = 2 | |
Maximum Concurrent Jobs = 1 | |
Volume Poll Interval = 15 | |
} | |
Device { | |
Name = vDrive-3 | |
Media Type = File | |
Archive Device = /usr/local/bacula/volumes | |
LabelMedia = yes | |
Random Access = yes | |
AutomaticMount = yes | |
RemovableMedia = no | |
AlwaysOpen = no | |
Autochanger = yes | |
Drive Index = 3 | |
Maximum Concurrent Jobs = 1 | |
Volume Poll Interval = 15 | |
} | |
Device { | |
Name = vDrive-4 | |
Media Type = File | |
Archive Device = /usr/local/bacula/volumes | |
LabelMedia = yes | |
Random Access = yes | |
AutomaticMount = yes | |
RemovableMedia = no | |
AlwaysOpen = no | |
Autochanger = yes | |
Drive Index = 4 | |
Maximum Concurrent Jobs = 25 | |
Volume Poll Interval = 15 | |
} | |
Messages { | |
Name = Standard | |
director = bacula-dir = all | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have this defined in all job defs. Otherwise, a job might want to use a Volume already | |
mounted and in use by an existing job. This directive tells it to use another Volume, | |
which would be mounted on another drive. | |
JobDefs { | |
... | |
PreferMountedVolumes = no | |
... | |
} | |
Here's a full example: | |
JobDefs { | |
Name = "DefaultJob" | |
Type = Backup | |
Level = Incremental | |
Schedule = "WeeklyCycle" | |
# note this is where I specify that SD | |
Storage = CreyFile | |
Messages = Standard | |
Write Bootstrap = "/usr/local/bacula/bsr/%c_%n.bsr" | |
Pool = FullFile # required parameter for all Jobs | |
# don't get hung up on these bits... | |
Full Backup Pool = FullFile | |
Differential Backup Pool = DiffFile | |
Incremental Backup Pool = IncrFile | |
Priority = 10 | |
# don't spool date when backing up to disk | |
Spool Data = no | |
Spool Attributes = yes | |
# this is the important part | |
PreferMountedVolumes = no | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are exerpts from my configuration files. They are not complete. | |
This should get you started. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment