In a recent article, I wrote about how to setup the various tools, such as mtx-changer, to allow your tape library to work with Bacula. In this article, I'll show how I integrated this tape library into my existing Bacula configuration.
Given the previous work, I will assume you have mtx-changer working will with your tape library.
The configuration
Here are a few extracts from my bacula-dir.conf file which relate to the tape library:
# Definition of DLT tape storage device
Storage {
Name = DigitalTapeLibrary
Address = bacula.example.org
SDPort = 9103
Password = "VeryComplexPassword"
Device = "DEC TL800"
Media Type = DLT
}
And from bacula-sd.conf:
Autochanger {
Name = "DEC TL800"
Device = "DEC TZ89"
Description = Digital DLT MiniLibrary - TL891
Changer Device = /dev/pass4
Changer Command = "/usr/local/sbin/mtx-changer %c %o %S %a %d"
}
Device {
Name = "DEC TZ89"
Description = Digital DLT MiniLibrary - TL891
Media Type = DLT
Archive Device = /dev/nsa1
Autochanger = yes
Drive Index = 0
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
Spool Directory = /home/bacula/spooling-lib
Maximum Spool Size = 11759496889
Maximum Job Spool Size = 11759496889 # 10GB
}
Labelling the tapes
Here is the command to label my barcodes
*label barcodes storage="DigitalTapeLibrary"
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Connecting to Storage daemon DigitalTapeLibrary at bacula.unixathome.org:9103 ...
3306 Issuing autochanger "slots" command.
Device "DEC TL800" has 0 slots.
No slots in changer to scan.
*
Eh? What's that?
Fixing permission issues
