Tape Backup Setup FreeNAS + Bacula

Status
Not open for further replies.

jpoa

Dabbler
Joined
Oct 7, 2013
Messages
24
Greetings!

Follows my current setup with FreeNAS to get an HP tape writer to work with the Bacula plugin. The end result is what I intended, with all custom options working (you can literally hear the pooling working - no shoe shine on the tape).

This thread is simply to clean place to discuss the configuration and possible optimisations rather than discussing/wondering if it works at all. The documentation results of a request from this thread here.

Admins, I considered putting this in the plugins section but I think it suits better in Storage, if you think otherwise please move it and accept my apologies.

WORD OF CAUTION: Under no circumstances apply the settings here and just move on! Do the tests, check, etc.. Take this guide as what it is, a guide.

That said, let's move on. The documentation is not perfect and I don't always hang around in the forums so you will have to understand a bit of what is going on, but I think this should do the trick for you.


# Bacula SD configuration on FreeNAS

We configure bacula via the web interface and let it start once.

This will create the config files and so on.

Since we are using a tape drive with FreeNAS we want to do some custom configuration to make sure everything is working properly and this has to be done via the cli. The complete configuration file in use is shown in [1] and should be located at the indicated path.

The problem with this approach is that the customised configuration will be overwritten with every start of the plugin, leading Bacula to fail some tests. Please bear in mind that these options are not supported via the bacula plugin UI so you need to do them via CLI and prevent the start script of bacula by IXSystems from overwriting it!

tl:dr; Risk of data loss if you use the bacula plugin with tapes without customisation!

To avoid the Bacula SD plugin on FreeNAS to rewrite the configuration file every time it starts:

Open the shell on the Jail and edit the start script

vi /usr/local/etc/rc.d/ix-bacula-sd

At the end change to match this:

name=ix-bacula-sd
#start_cmd=generate_bacula_sd
start_cmd=':'
stop_cmd=':'

So what we have done is disable the generation of a new bacula_sd file upon start. The complete file can be seen in [2] and should be located in the indicated path.

Also, in order to test btape you need to copy the config file to /usr/pbi/bacula-sd-amd64/etc/bacula/bacula-sd.conf since btape expects it to be there. The complete path from outside the jail is /mnt/<dataSet>/jails/bacula-sd_1/usr/pbi/bacula-sd-amd64/etc/bacula/bacula-sd.conf


[1] bacula-sd.9103.conf
Complete path, from the outside of the jail: /mnt/<dataSet>/jails/bacula-sd_1/usr/pbi/bacula-sd-amd64/etc/bacula-sd.9103.conf

[2] ix-bacula-sd
Complete path, from the outside of the jail: /mnt/<dataSet>/jails/bacula-sd_1/usr/local/etc/rc.d/ix-bacula-sd
 

Attachments

  • Hestia_Bacula_SD_A.png
    Hestia_Bacula_SD_A.png
    12 KB · Views: 953
  • Hestia_Bacula_SD_B.png
    Hestia_Bacula_SD_B.png
    14.2 KB · Views: 903
  • Hestia_Bacula_SD_C.png
    Hestia_Bacula_SD_C.png
    11.5 KB · Views: 851
  • Hestia_Bacula_SD_D.png
    Hestia_Bacula_SD_D.png
    16.6 KB · Views: 782
  • Hestia_Bacula_SD_E.png
    Hestia_Bacula_SD_E.png
    14.3 KB · Views: 801
  • Hestia_Bacula_SD_F.png
    Hestia_Bacula_SD_F.png
    16 KB · Views: 740
  • Hestia_Bacula_SD_G.png
    Hestia_Bacula_SD_G.png
    30.8 KB · Views: 759
  • Hestia_Bacula_SD_H.png
    Hestia_Bacula_SD_H.png
    16.7 KB · Views: 730
  • Hestia_Bacula_SD_I.png
    Hestia_Bacula_SD_I.png
    36.6 KB · Views: 770
  • Hestia_Bacula_SD_J.png
    Hestia_Bacula_SD_J.png
    20.4 KB · Views: 741

jpoa

Dabbler
Joined
Oct 7, 2013
Messages
24
Follows the remaining files.
 

Attachments

  • Hestia_Bacula_SD_K.png
    Hestia_Bacula_SD_K.png
    13.9 KB · Views: 770
  • Hestia_Bacula_SD_L.png
    Hestia_Bacula_SD_L.png
    21.2 KB · Views: 768
  • Hestia_Bacula_SD_M.png
    Hestia_Bacula_SD_M.png
    28 KB · Views: 774
  • Configuration_Files.zip
    2.6 KB · Views: 459

Corey Easley

Cadet
Joined
Apr 21, 2016
Messages
1
Hey jpoa. do you still login here anymore? I need help setting up tape backup in bacula. do you use Irc or have email. skype?
let me know

Thanks
 

Valdhor

Explorer
Joined
Feb 29, 2016
Messages
70
I am in the same boat. I have managed to get Bacula installed and set up in a jail to the point of btape working to test the drive and autochanger. I still need to set up a backup job and have it complete.

If you'd like the steps I performed then please let me know. Note that this is with a new install of FreeNAS 9.10 Stable. I couldn't get the Plugin to work.
 

philhu

Patron
Joined
May 17, 2016
Messages
258
I am in the same boat. I have managed to get Bacula installed and set up in a jail to the point of btape working to test the drive and autochanger. I still need to set up a backup job and have it complete.

If you'd like the steps I performed then please let me know. Note that this is with a new install of FreeNAS 9.10 Stable. I couldn't get the Plugin to work.
Valdhor, I would love to get your step by step to get the tape part to work.

I am opposite. I have gotten backula plugin up and running, but giving ownership to the jail is stumping me.

I can upload my config files if you want to show how jobs are defined.
 

Valdhor

Explorer
Joined
Feb 29, 2016
Messages
70
The biggest problem I had with the whole thing is getting all of the configuration files having the same authentication info. Once I had that figured out btape actually worked and tested everything.

Since my last test I have blown away my whole FreeNAS setup and created a fresh install. This is now my production box with 12x4TB in a RAIDZ3.

I haven't got around to re-setting up the bacula stuff. I may try again this weekend given some time.
 

philhu

Patron
Joined
May 17, 2016
Messages
258
I solved the auth issues by setting all passwords the same :)

How did you get the scsi tape drive to be owned and used by bacula in a jail?
 

Valdhor

Explorer
Joined
Feb 29, 2016
Messages
70
So you have a SCSI tape drive/library? Mine is a Dell SAS library. One of the first problems I ran into was the card I got for it. I assumed (And you know what that means) that a Dell PERC/6i would work. It doesn't. The PERC cards are for RAID arrays not tape drives/libraries. I swapped it out for a Dell SAS 5/E which recognized both the drive and library immediately. The PERC card could see the drive but not the library. Luckily these cards are available used on eBay for like $15 so it didn't break the bank testing them.

There is one person out there that has done a ton of work with Bacula on FreeBSD and that is Dan Langille. I have used his articles extensively to get my stuff working. He has a Dell TL4000 whilst I have a Dell TL2000. You can see some of his articles at http://dan.langille.org/?s=btape&searchsubmit= . He also has a lot of articles on the FreeBSD forums http://www.freebsddiary.org/bacula.php .

As I said, I'll see if I can reproduce my earlier work this weekend and post the results.
 

philhu

Patron
Joined
May 17, 2016
Messages
258
Cool. The tape library is running now on a centos box and a second scsi card I have, plugged into the freenas box is recognized and driver loaded. Nect step is to connect the scsi tape to freenas card and reboot. See if it sees it

The give ownership of the tape stuff to the bacula jail and load my config files from the centos box. I made the centos mountpoints the same path as my jail storage mounts on, so the old config should just run after doing a btest
 
Status
Not open for further replies.
Top