Bacula Windows Client Install and configuration

 

 

I started this series off with:

and will be continuing it with

Installing Bacula Windows Client

So we have configured Bacula in Bacula with Tape Autochanger and it working, so Now we need to make it works with Windows Client and Windows Cluster. I actually use this on Windows 8.1 and Windows 2012 R2 and it works. I also am successfully using this to backup Windows 2012 R2 Hyper-V Virtual Machines in a clustered environment, and Windows Clustered File Server. Once you figure out how to do it, it is not that difficult. In this article I Will go over configuring the Windows Client and this should work for Windows 2008, Windows 2008 R2, Windows 7, Windows 2012 and Windows 2012 R2. 

The windows client can be found at: http://sourceforge.net/projects/bacula/files/Win32_64/5.2.10/. Down load it and run the Install with the defaults.

It would be nice if you could just install it and have it work, but you cannot, you need to change the configuration files on both the client and the server. There are 4 configuration files on the client in the bacula directory that is installed by default in "C:\Program Files\bacula":

  1. <Bacula Dir>\bin32\bat.conf (windows console)
  2. <Bacula Dir>\bin32\tray-monitor.conf
  3. <Bacula Dir>\bconsole.conf
  4. <Bacula Dir>\bacula-fd.conf

When you edit each of these configuration files, you can use notepad to do it.

 

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_
SDPASSWD=_MiL4ZF63s4PXcumhMjkhajjeuj9_s
SDMPASSWD=Yozr62NpQqXasdf776s_Ggahy
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.
  • SDPASSWD is the password the Director on the Bacula server uses to connect to the storage daemon, but is not used on your clients.
  • SDMPASSWD is used for the monitors to connect to the storage daemon. The main place this is used is in the tray-monitor.conf file if you want your tray monitor to connect to your storage to monitor it's status. This password is used in the Storage {.... Password = "Yozr62NpQqXwzshaxai0x_RyAFMGyytJX" } section there.
  • 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 FileDaemon 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" ... }​

 

Configuring Client .conf files

 

BAT Console (Bacula Admin Tool) & bat.conf

If you are not going to use the Windows "Bat" console this does not need to be configured. the Bat console gives you a local windows interface to connect ot the Bacula server see status of different jobs, media, manage media and such. It is not a full management console but it does get you part way there. The bat.conf is very simple:

#
# Bacula Administration Tool (bat) Configuration File
#
Director {
  Name = <bacula Server>-dir               #Name of your Director. THis is normally the Bacula Server Name with "-dir" appended to it
  DIRport = 9101                                       #Port set in the bacula-dir.conf on the Bacula Server. This is normally 9101
  address = <FQDN or ip of bacula Server>                   #FQDN or IP of the bacula server
  Password = "Mjmmn_jens0-734NHjnebH_je_"       #DIRPASSWD identified at the top of this page
}​

 

Tray Monitor & tray-monitor.conf

The tray monitor is a tool that runs on windows computers and is included in the Windows Bacula client instalation that allows you to monitor what is going on in your Bacula environment including the Director, File Daemons and Storage Daemons. This is configured in the tray-monitor.conf file, also the bacula-dir.conf file on the Bacula server needs to be updated. we will cover that in the Director section. You can add several or all of your clients here, but the computer you are using for monitoring 

#
# Bacula Tray Monitor Configuration File
#

   #have this section for eavh client

 # Client1 

Client {
  Name = <client2>-fd                                                                #File Daemon client name. it is usually the computer name with "-fd" added to the end
  Address = <FQDN or IP of client1>
  FDPort = 9102                                                                                           # Port set for the FileDaemon in bacula-fd.conf on the client. normally 9102
 Password = "BUJu87_88jg7_KgTh__KH"                                      # password for FileDaemon (FDMPASSWD from top of page)

}

 

#Client 2

Client {
  Name = <client2>-fd                                                                     #File Daemon client name. it is usually the computer name with "-fd" added to the end
  Address =<FQDN or IP of Client2>
  FDPort = 9102                                                                                           # Port set for the File Daemon in bacula-fd.conf on the client normally 9102
 Password = "BUJu87_88jg7_KgTh__KH"                                      # password for File Daemon (FDMPASSWD described at top of page)

}

Storage {
  Name = <BaculaStorageServer>-sd                                    #normally the Bacula Server name with "-sd" added at the end
  Address = <FQDN or IP of server>
  SDPort = 9103                                                                          #Port set onin the bacul-sd.conf file on the server. Normally 9103
  Password = "Yozr62NpQqXasdf776s_Ggahy"          # password for StorageDaemon (SDMPASSWD described at top of page)
}

Director {
  Name = <Bacula Director Name>-dir                   #normally the Bacula Server name with "-dir" added at the end
  DIRport = 9101                                                            #Port set in the bacula-dir.conf on the Bacula Server. Normally 9101
  address =<FQDN or IP of Bacula Server>
}

 

bconsole & bconsole.conf

bconsole is the Bacula command line console. this is very simple to configure and just need the connection information to get to the director, but this will also need to be configured in the bacula-dir.conf on the bacula server side of the house.

Director {
  Name = <Bacula Director Name>-dir                   #normally the Bacula Server name with "-dir" added at the end
  DIRport = 9101                                                            #Port set in the bacula-dir.conf on the Bacula Server. Normally 9101
  address =<FQDN or IP of Bacula Server>
Password = "​Mjmmn_jens0-734NHjnebH_je_"    #DIRPASSWD described at the top.

}

 

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.

#
# "Global" File daemon configuration specifications
#
FileDaemon {                            
  Name = <Computername>-fd            #Normally the Computer Name  with "-fd" appended to it
  FDport = 91002              # where we listen for the director
  WorkingDirectory = "C:\\Program Files\\bacula\\working"
  Pid Directory = "C:\\Program Files\\bacula\\working"
# Plugin Directory = "C:\\Program Files\\bacula\\plugins"  Maximum Concurrent Jobs = 10
}

#
# 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"      #FDPASSWD 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
}

 

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

     
  4. Select "Add a new backup client."

     
  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.
    4. Bacula FD port which by default is 9102. this must be 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

       
  6. Click on the client you just added.

     
  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.

     
  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.

     

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
}

Repeat these steps for each client.

 

Creating a File Set for Windows

The biggest thing to remember is that instead of using "\" in your paths, use "/". an example is "C:\Program Files\bacula" would be "C:/Program Files/bacula". Again we will use webmin to create the File Set.

  1. Click on "File Sets"

     
  2. On the File Sets page, click "Add a new backup file set.".

     
  3.  Now you will need to fill out the form. Since the backup is not on the local machine, you have to manually type the paths to use
    1. File Name Set: Give it a name that you and others that need access to this will recognize and understand
    2. Enter the file path that you want to back up. REMEMBER use "/" instead of "\"
    3. Enter Files and Paths you want to exclude from the backups.
    4. Click "Create" Button

       

 

Consoles and monitors on clients

I like to be able to see what is going on from my Windows computer with Bacula. You need to set the /etc/bacula/bacula-dir.conf, /etc/bacula/bacula-fd.conf and  /etc/bacula/bacula-sd.conf files to allow this. to do that, use your favorite text editor in Linux to edit these. Personally I use nano from a ssh shell.

 

/etc/bacula/bacula-dir.conf

You will need to add a console section to this file for each client you intend to use a Tray Monitor or BAT console to connect to the Bacula server from:

Console {
  Name = client1-mon              #This is normaly the client name with "-mon" added to the end of it.
  Password = "GsvJOhNCUsJj_bb7xbs-z-adsf736_"       #the DIRMPASSWD described in the top of this page
  CommandACL = status, .status
}

Console {
  Name = client2-mon              #This is normaly the client name with "-mon" added to the end of it.
  Password = "GsvJOhNCUsJj_bb7xbs-z-adsf736_"       #the DIRMPASSWD described in the top of this page
  CommandACL = status, .status
}

 

/etc/bacula/bacula-fd.conf

You will need to add a Director entry for each client that will be monitoring the File Daemon on the Bacula Server:

Director {
  Name = client1-mon              #This is normaly the client name with "-mon" added to the end of it.
  Password = "BUJu87_88jg7_KgTh__KH"       #the FDMPASSWD  described in the top of this page
  Monitor = yes
}

Director {
  Name = client2-mon              #This is normaly the client name with "-mon" added to the end of it.
  Password = "BUJu87_88jg7_KgTh__KH"       #the FDMPASSWD  described in the top of this page
  Monitor = yes
}

 

/etc/bacula/bacula-fd.conf

You will need to add a Director entry for each client that will be monitoring the Storage Daemon on the Bacula Server:

Director {
  Name = client1-mon              #This is normaly the client name with "-mon" added to the end of it.
  Password = "Yozr62NpQqXasdf776s_Ggahy"       #the SDMPASSWD  described in the top of this page
  Monitor = yes
}

Director {
  Name = client2-mon              #This is normaly the client name with "-mon" added to the end of it.
  Password = "Yozr62NpQqXasdf776s_Ggahy"       #the SDMPASSWD  described in the top of this page
  Monitor = yes
}

 

Others in the Series

Started with

and will be continuing it with

This website and its content is copyright of ITHierarchy Inc - © ITHierarchy Inc 2013-2015. All rights reserved.

Any redistribution or reproduction of part or all of the contents in any form is prohibited other than the following:

  • you may print or download to a local hard disk extracts for your personal and non-commercial use only
  • you may copy the content to individual third parties for their personal use, but only if you acknowledge the website as the source of the material

You may not, except with our express written permission, distribute or commercially exploit the content. Nor may you transmit it or store it in any other website or other form of electronic retrieval system.

 

;