· Tutorial ·

How to install the bacula client on my cloud without SWPanel

In this manual we will show you step by step how to install the backup agent 'Bacula'. This is an application that allows communication between your server and our backup server to perform and schedule backups for you.

This manual assumes that you have the necessary technical knowledge to establish an SSH or RDP connection to your server and use Debian, Ubuntu or Windows commands.

If you do not have the necessary skills, our engineering team can perform these tasks for you. Please contact us via our support wall to find out how.

Instalación en Linux

1. Establish an SSH connection to your server
Throughout this manual we will assume that you are logged in as a root user.

2. Package installation
To install the required package run the following command:

apt-get install bacula-fd

3. Change the configuration file
The configuration file is located in /etc/bacula/bacula-fd.conf

We recommend that you edit the document with the 'nano' editor:

nano /etc/bacula/bacula-fd.conf

Below we explain the changes you need to make in this document. To make it easier for you, we have separated it into blocks.

First block "Director":** ** First block "Director":** First block "Director":** First block "Director":** First block "Director

Here we will define the names of the copy servers and an access password. You will have to inform this password to our engineers to configure the "Bacula" daemon on the copy server. At the end of the manual, we will explain how to do it.

Attention: Copy the following block as shown in the example. You only have to modify the word $PWD_BACULA by your own alphanumeric password from 15 to 30 characters.


Director {
    Name = bacula.dnssw.net-dir
    Password = "$PWD_BACULA"
}
Director {
    Name = bacula2.dnssw.net-dir
    Password = "$PWD_BACULA"
}
Director {
    Name = bacula3.dnssw.net-dir
    Password = "$PWD_BACULA"
}
Director {
    Name = bacula4.dnssw.net-dir
    Password = "$PWD_BACULA"
}
Director {
   Name = bacula5.dnssw.net-dir
       Password = "$PWD_BACULA"
}
Director {
        Name = bacula6.dnssw.net-dir
    Password = "$PWD_BACULA"
 }
 Director {
    Name = baculaMadrid.dnssw.net-dir
    Password = "$PWD_BACULA"
 }
 Director {
    Name = baculam1.dnssw.net-dir
    Password = "$PWD_BACULA"
 }
 Director {
    Name = baculam2.dnssw.net-dir
    Password = "$PWD_BACULA"
}
Director {
    Name = baculam3.dnssw.net-dir
    Password = "$PWD_BACULA"
}
Director {
        Name = baculam4.dnssw.net-dir
    Password = "$PWD_BACULA"
}
Director {
    Name = baculam5.dnssw.net-dir
    Password = "$PWD_BACULA"
}

Second block "Director":

This block is not necessary, you can comment it by adding a # in front of each of the lines. It should look like this:

# 
# Restricted Director, used by tray-monitor to get the 
# status of the file daemon 
# 
# Director {
#  Name = bacula3.dnssw.net-mon 
#  Password = "GexFhZYo843rTweXJq0RJLQtpyd" 
#  Monitor = yes 
# }

** Third block "File Deamon":**

In this block we have to define the name and the IP of the director.

Just replace the word $SERVER_NAME with the hostname of your server and make sure that at the end there is concatenated "-fd".

You can get the server name with the command: hostname --fwdn.

Additionally you have to replace the IP address in the FDAddress field by the IP address of your server.

Caution: Copy the following block as shown in the example.

FileDaemon {
    Name = $SERVER_NAME-fd
    FDport = 9102
    WorkingDirectory = /var/lib/bacula
    Pid Directory = /var/run/bacula
    Maximum Concurrent Jobs = 20
    FDAddress = 0.0.0.0
}                           

The configuration file may already show the $SERVER_NAME field substituted. It is not necessarily correct. Please check the real name with the provided command.


Fourth block "Messages":

Finally, you have to define the server to which all the logs of the copying process will be sent. Just leave the line "Name = Standard". You can comment out the other one by adding a # at the beginning of the line. It should look like this:

Messages {
    Name = Standard
    # director = cl2018123456-dir = all, !skipped, !restored
} 

4. Restart the bacula daemon to apply the configuration and check that the service is listening on the assigned port.

Execute the following command:

/etc/init.d/bacula-fd restart
netstat -pant | grep 9102

Write a new comment on your support wall indicating that you wish to communicate the Bacula password to us. For your convenience, we have attached a sample message that you can use as a template:

Hello,
Following your manual I have already configured the bacula software for the backups I have contracted.
I would appreciate if you could check the configuration so that the backups can be done from tonight. I give you the data:

Server: cl20YYYMMDDDHHNNNN.dnssw.net 
IP: 81.25.1XX.YYYY
Bacula password: 12345678901234567890

Thank you very much,
Regards

Caution: Modify the Server, IP and Bacula Password fields to those corresponding to your server. The Bacula Password is the one we have defined in the first block.

**That's it! Once you have completed these steps and communicated the password to our engineering team, the backups will start without you having to worry about anything else. You can follow up from your SWPanel.

Windows installation

1. Establish an RDP connection to your server
Throughout this manual we will assume that you are logged in as Administrator user.

2. Download the installation package
In a browser type the URL:

https://www.bacula.org/downloads/Bacula-9.6.7/

In the list that appears, download version "bacula-win64-9.6.7.exe"

Once downloaded, run the installer.

3. Installation of the downloaded package

When the installer opens, click on "Next ".

enter image description here

We accept the license by clicking on "I Agree ".

enter image description here

Select "Automatic " and click "Next ".

enter image description here

We make sure that the installation type is "Cient " and click "Next ".

enter image description here

In the following installer window click on "Install ".

enter image description here

We make sure to UNMARK the "Save Client template in " option and click "Next ".

enter image description here

Finally we finish the installer by clicking on "Finish ".

enter image description here

4. Edit the necessary configuration files

The configuration file is located at:

C:\Program Files\Bacula\bacula-fd.conf

First block "File Daemon ".

In this block you have to define the name of the director.

Substitute the word $FQDN_SERVER with the host name of your server and make sure that at the end you have concatenated "-fd ".

Caution: It is possible that the configuration file already shows this field by default. It is not necessarily correct. Please check it explicitly, by running the command "ipconfig /all " in a cmd. Take the values "Hostname" and "Primary DNS Suffix" that you will be shown

A valid example for this configuration line would be: CL2020123456.dnssw.net-fd

FileDaemon {    
    Name = $FQDN_SERVIDOR-fd # this is me   
    FDport = 9102 # 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
}

**Caution: ** It is important to allow connections to ports 9102 and 9103 on the local firewall for successful backups.


Second Block "File Daemon ".

Here we will define the names of the copy servers and an access password. You will have to inform this password to our engineers to configure the "Bacula" daemon on the copy server. At the end of the manual we will explain how to do this.

Please specify the server names as shown in the example and replace the word "$PWD_BACULA " with your own alphanumeric password of 15 to 20 characters.

# 
# List Directors who are permitted to contact this File daemon 
# 
Director {
    Name = bacula.dnssw.net-dir
    Password = "$PWD_BACULA"
}
Director {
    Name = bacula2.dnssw.net-dir
    Password = "$PWD_BACULA" 
} 
Director {
    Name = bacula3.dnssw.net-dir   
    Password = "$PWD_BACULA" 
}
Director {
    Name = bacula4.dnssw.net-dir   
    Password = "$PWD_BACULA"  
}
Director {
    Name = bacula5.dnssw.net-dir   
    Password = "$PWD_BACULA"  
}
Director {
    Name = bacula6.dnssw.net-dir   
    Password = "$PWD_BACULA"  
}
Director {
    Name = baculaMadrid.dnssw.net-dir   
    Password = "$PWD_BACULA" 
}
Director {
    Name = baculam1.dnssw.net-dir   
    Password = "$PWD_BACULA" 
}
Director {
    Name = baculam2.dnssw.net-dir   
    Password = "$PWD_BACULA" 
}
Director {
    Name = baculam3.dnssw.net-dir   
    Password = "$PWD_BACULA" 
}
Director {
    Name = baculam4.dnssw.net-dir   
    Password = "$PWD_BACULA" 
}
Director {
    Name = baculam5.dnssw.net-dir   
    Password = "$PWD_BACULA" 
}

**Third block "Director

This third block is not necessary in our infrastructure. So it can be deleted or commented out

# 
# Restricted Director, used by tray-monitor to get the 
#   status of the file daemon 
# 
#Director { 
#  Name = bacula3.dnssw.net-mon 
#  Password = "GexFhZYo843rTweXJq0RJLQtpyd" 
#  Monitor = yes 
#} 

Fourth block "Messages ".

Finally, you have to define the server to which the logs of the backup process will be sent.

By default, it will send the logs to the server that started the backup process. To do this we will comment the line "director = @director_name@ = all, !skipped, !restored " by adding a # at the beginning of the line, as follows:

# Send all messages except skipped files back to Director 
Messages {    
    Name = Standard  
    # director = @director_name@ = all, !skipped, !restored 
} 

5. Restart and make sure that the service is listening on the assigned port.

Next, you will need to restart the server to allow the "bacula-fd" service to start automatically.

Once restarted, you can verify that the service is running by checking that the bacula client is listening on the port we configured.

To do this, run the following command from the Command Prompt (CMD):

netstat -a | find "9102"

In case the "bacula-fd" service is running, it will be shown with the status "LISTENING ".


6. Communicate the password to SW.

Write a new comment on your support wall indicating that you wish to communicate the Bacula password to us. For your convenience, we have attached a sample message that you can use as a template:

Hello,
Following your manual I have already configured the bacula software for the backups that I have contracted. 
I would appreciate if you could check the configuration so that the backups can be done from tonight. I give you the data:

Server: cl20YYYMMDDDHHNNNN.dnssw.net 
IP: 81.25.1XX.YYYY
Bacula password: 12345678901234567890

Thank you very much,
Regards

Caution: Modify the Server, IP and Bacula Password fields to those corresponding to your server. The Bacula Password is the one we have defined in the second block.


That's it! Once you have completed these steps and communicated the password to our engineering team, the backups will start without you having to worry about anything else. You can follow up from your SWPanel.

i