Bacula Client and Windows Cluster Service

Managed ad

By justin, 15 March, 2015

I started this series off with:

and will be continuing it with

I run a Windows Cluster on Windows 2012 R2. I have a File Server in the Clustered environment and wanted to make sure I get Cluster's file share backedup. I also run a Scale-out File Server in the cluster and the principle is the same for both scenarios. What I go over will work for backing files in those services. If there are Hyper-V services in the environment some tweeking needs to be done but I will cover that in a different article.

Ads disabled for Justin
Google AdSense 250x250

 

Note on Scale-Out File Server

On Scale-Out File Servers, you will want to add a Client Access Point Resource to the Fail Over Cluster Role since Scale-Out file servers can be accessed by any node, and this will give the backup part of it a dedicated IP that will always be on the owner host

Prepare Bacula Directory

I will assume you did a install of the Bacula Windows Client as discussed in my article Installing Bacula Windows Client on at least 1 of your cluster nodes. By default it installed into the "C:\Program Files\Bacula" directory. You will need these files.

  1. Logon to the node that currently owns the service you want to add Bacula Windows Client to.
  2. You will need to copy the "C:\Program Files\Bacula" directory to a dist in that cluster service:
    • If it is a simple File Server Role in your cluster normally has a Drive Letter such a L:\ (Which we will use for our example). Copy the bacula directory there.
    • If it is a Scale-Out File Server Role in your cluster, will have your storage mounted (normally) under "C:\ClusterStorage\Volume<#>". Copy the bacula directory there.

 

Passwords:

When you initially set up Bacula, it created a file on the linux box that has the passwords you will need: /etc/bacula/common_default_passwords. You can use nano or another editor to read this file as it is just a text document. the document looks like:

 

#
# This file holds defaults for new Bacula packages installed on this system.
# It is used only when you install a new Bacula package, and can be
# safely removed at any time.

DIRPASSWD=Mjmmn_jens0-734NHjnebH_je_
DIRMPASSWD=GsvJOhNCUsJj_bb7xbs-z-adsf736_
FDPASSWD=asdf8jejHHHGebe_k377u-wGt
FDMPASSWD=BUJu87_88jg7_KgTh__KH

 

Password Used for:

  • DIRPASSWD is used when something needs to connect to the Director (Such as the console) on the Bacula server. Any configuration file that has the Director {​  ....  Password ="Mjmmn_jens0-734NHjnebH_je_"}, that password is used here
  • DIRMPASSWD is the Monitor password, so when something needs to connect in the Monitor {.... Password = "GsvJOhNCUsJj_bb7xbs-z-adsf736_"} This password will be used.
  • FDPASSWD is the File Daemon password and is the password clients use for the Director to connect to the file daemon, this password is used such as Director {Name=<BaculaServer>-dir .... Password ="asdf8jejHHHGebe_k377u-wG"...}. This can be different for each client but must match in the client bacula-fd.conf and the bacula server's bacula-dir.conf files.
  • FDMPASSWD is the password the various monitors use to connect to you client File Daemon and is used in the bacula-fd.conf files in the director section wher the Name ends in "-mon": Director { ... Name = client-mon .... Password = "BUJu87_88jg7_KgTh__KH" ... }​

Configure Bacula bacula-fd.conf file, Cluster Service and Bacula Server

Now that you have the files where all nodes can access them, you need to configure the bacula .conf files and add it to the Bacula server so they will be able to communicate. Edit these files in notepad.

Bacula File Daemon & bacula-fd.conf

the Bacula File Daemon provides communication between the Director and the storage Daemon to back up the files on your client. for this to work, the client must have it's bacula-fd.conf file configured. This must have the Bacula Server's Director configured in it as well as any Tray Monitor that will be monitoring it. You will also need to set a FD port that nothing else on the nodes will use such as 9100, 9105, 9106...

#
# "Global" File daemon configuration specifications
#
FileDaemon {                            
  Name = <Role NetBIOS Name>-fd        #NetBIOS name of the Cluster Role with "-fd" appended to it
  FDport = 9100               # where we listen for the director set a Unique port number. you will need to use the same port on your Director and any BAT or Tray Monitor that is monitoring this.
  WorkingDirectory = "C:\\ClusterStorage\\Volume4\\bacula\\working"      #Set this to the working directory path where you have the bacula installed Always replace single "\" with double "\\".
  Pid Directory = "C:\\ClusterStorage\\Volume4\\bacula\\working"              #Set this to the working directory path where you have the bacula installed Always replace single "\" with double "\\".

}

#
# List Directors who are permitted to contact this File daemon
#
Director {
  Name = <Bacula Server>-dir                                                                 #Normally the Bacula Server Name with "-dir" added on
  Password = "asdf8jejHHHGebe_k377u-wGt"      #FDMPASSWD described at the top of the page
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the file daemon
#

Director {
  Name = <Client1>-mon                            #a client that will be allowed to monitoring this through the  Tray Monitor or BAT console
  Password = "BUJu87_88jg7_KgTh__KH"      #FDMPASSWD described at the top of the page
  Monitor = yes
}
Director {
  Name = <Client1>-mon                            #a client that will be allowed to monitoring this through the  Tray Monitor or BAT console
 Password = "BUJu87_88jg7_KgTh__KH"      #FDMPASSWD described at the top of the page
  Monitor = yes
}

# Send all messages except skipped files back to Director
Messages {
  Name = Standard
  director = <Bacula Server>-dir = all, !skipped, !restored
}

 

Cluster Service Setup

We now need to install the File Daemon service on each cluster node then add the service. we will do this for each node. This If this is a Scale-out File Server Role it is done a little differently than if it is a regular File Server Role because a Scale-out file server Role can be contacted on any node while a File Server Role can only be contacted on the role that owns it.

Scale-Out File Server Role

  1. You need to add a Client Access Resource by right clicking on the node and selecting "Add Resource-->Client Access Point"
    Image removed.
     
  2. Now you will want to give it a Network name that (unique computername which can be anything, my example is "rolebackup") and an IP address that it will use. THis will be the computer name used by the Director to contact the bacula-fd on it.
    Image removed.
     

On Scale-our AND regular File Server Cluster

  1. on the current node that owns the role run the following command (change "<Role Name>" to the actual name of the role and "<X:\Path\to\Bacula>" to the actual path to the bacula folder ) from a elevated command prompt.
    sc create Bacula-fd-<RoleName> binPath="<X:\Path\to\Bacula>\bacula-fd.exe /service  -c <X:\Path\to\Bacula>​\bacula-fd.conf" start=manual
  2.  fail over to the next node and repeat step 1 for each node of the cluster
  3. From a Fail Over Cluster Manager:
    1. right click on the role you want to add the Generic Service to, and select Add Resource-->Generic Service
      Image removed.
       
    2. Select the Bacula-fd-<RoleName> service and Clic "Next"
      Image removed.
       
    3. On Confirmation, just click Next
      Image removed.
       
    4. Click Finish.
    5. Bring the resource online in the Fail over Cluster Manager.
    6. The cluster Role is now set up.

 

Required Bacula Server Configurations

Webmin has a Bacula Backup System interface that can simplify setting up clients and file backups. While Webmin does not have an all inclusive solution for Bacula (which is why I built custom commands in my Bacula with Tape Autochanger ​article) it can ease the setting up the server to communicate with clients and file backups. I will Use that here to set up the File Daemon client list in bacula and showing you how to set up the file backup paths for Windows. I won't go in depth on setting up your schedules and jobs, if I get aroung to doing a full article on using Webmin for Bacula I will do more there, here I will assume you can figure that out for yourself.

  1. Open up your Webmin console in your browser
  2. select "Bacula Backup System" under "System".
  3. Select Backup Clients
    Image removed.
     
  4. Select "Add a new backup client."
    Image removed.
     
  5. Fill out the following information:
    1. Client FD Name. This is the name of the FileDaemon which you usually use the <computername>-fd
    2. Bacula FD Password which is the FDPASSWD we discussed at the top of the page. in the case of this example it is: asdf8jejHHHGebe_k377u-wGt
    3. Hostname or IP Address. Use the FQDN or the IP address of the client computer (Fail over cluster name or IP, if this is a Scale-Out File Server it will be the name you entered in the Cliant Access Point you created earlier). 
    4. Bacula FD port which by default is 9102 but should be changed to the port you configured in the bacula-fd.conf file.
    5. Set the catalog you want to use. By default this is MyCatalog.
    6. Configure how long you want Bacula to keep the files and back up jobs.
    7. Click "Create" button
      Image removed.
       
  6. Click on the client you just added.
    Image removed.
     
  7. You will now see all of the setting you put in. click the "Show Status" Button at the bottom of the page so you can verify it is communicating.
    Image removed.
     
  8. You will Now see the status of your client if it connected properly. if not make sure the windows Bacula-FD service is running.
    Image removed.
     

if you look in the /etc/bacula/bacula-dir.conf file on your server you will be able to find the following in it:

Client {
  Name = client1-fd
  Address = client1.domain.com
  FDPort = 9105
  Catalog = MyCatalog
  Password =  asdf8jejHHHGebe_k377u-wGt
  File Retention = 30 days
  Job Retention = 6 months
  AutoPrune = yes
}

 

Others in the series

Previous

and will be continuing it with

Comments