Bareos stands for Backup Archiving REcovery Open-Sourced. It is an open-source, client-server backup solution that archives data from all major operating systems. It can store its backups on hard disks, tape libraries, and in the cloud. It is network-based, designed to backup machines in your network.

Bareos server consists of several components, catalog, the Bareos Director, Storage Daemons, the File Daemons installed on the clients to be backed up, and the Bareos Console.

  • Bareos Director is the control center and the main server daemon. It contains the configurations, scheduling, and where interfaces connect to retrieve information to trigger jobs. Bareos director can be run on-premise where you are in control of the data and on the cloud via backup service providers.
  • The catalog is an SQL database that stores all kinds of information with regards to which state of the job and its parameters like when did it start and how long it has been running. It also has all the information of the files that have been backed up including file name, timestamps, permission, and checksum. It also restores jobs that are complete.
  • Storage daemons write data to storage devices which could be a disk, a tape library, or in the cloud. It can read Barcode labels and run the migration of jobs in multiple locations. It can also copy jobs to multiple locations. It also handles media errors.
  • File Daemons run on the client’s computer. They can read, write and verify files, create VSS snapshots, perform encryption and compression, run scripts on the client or server’s side and calculate checksums.
  • Bareos Console is the program that allows the administrator to interact with the Bareos Director. It requires minimal knowledge to use and can run on a different machine from the one running the Bareos Director. It enables administrators to examine the contents of the catalog and also check particular job statuses.

How does it Work?

The following diagram shows the typical interaction of the components services. The Director certainly oversees the general flow of information.

Diagram showing the process followed for a backup job. (docs.bareos.org)

Features

  • Scalable making it useful to be used at home and in large enterprises.
  • Cost-efficient for long-term storage.
  • Full, differential and incremental backups are supported.
  • Can be accessed on two interfaces; the command-line tool and the Web UI.
  • Support Encryption of the Transport layer by individual client or master keys.
  • Firewall Friendly by use of a limited set of port numbers.
  • Plugin interface for Python.
  • Frequently published nightly packages that improve stability.
  • Automated testing for new features developed.
  • Offers offline media storage.
  • Large developer community.
  • WebUI support over 10 different languages.
  • ReST documentation makes it more fun to read.
  • Multi-platform.

This guide will show you how to install Bareos Backup Solution in Kubuntu|KDE Neon.

Install Bareos on Kubuntu / KDE Neon

Update your system packages

### Kubuntu ###
sudo apt update && sudo apt upgrade -y

### KDE Neon ###
sudo apt update && sudo pkcon update -y

Step 1. Install Bareos

Export the Distribution. KDE Neon and Kubuntu are based on Ubuntu LTS so we are going to use the latest Ubuntu distribution which is 20.04.

DIST=xUbuntu_20.04
RELEASE=experimental/nightly
URL=https://download.bareos.org/bareos/$RELEASE/$DIST

Add the Bareos repository to the system.

wget -O /etc/apt/sources.list.d/bareos.list $URL/bareos.list

Add the package release key.

wget -q $URL/Release.key -O- | sudo apt-key add -

Update your system then install the Bareos packages.

sudo apt update
sudo apt install bareos postgresql bareos-database-postgresql

The installation continues and the package configuration opens as follows.

Choose the type of mail configuration.

Type in the domain name and continue.

Allow dbconfig-common to configure the databases for bareos-database-common.

Select the remote hostname and continue.

Type in your password to register the bareos database with the database server.

Confirm your password and let the installation finish.

Step 2. Install Bareos Web UI

To install the Bareos WebUI, use the following command.

sudo apt install bareos-webui

It will install Apache, PHP, and its extensions. Restart the Apache daemon to load the configurations.

sudo systemctl restart apache2

Start the daemons.

sudo systemctl start bareos-dir bareos-sd bareos-fd

Use the following command to confirm the status of all the services.

$ systemctl status bareos-dir bareos-sd bareos-fd
● bareos-director.service - Bareos Director Daemon service
     Loaded: loaded (/lib/systemd/system/bareos-director.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-05-05 13:39:17 EAT; 19s ago
       Docs: man:bareos-dir(8)
   Main PID: 57070 (bareos-dir)
      Tasks: 1 (limit: 4578)
     Memory: 1.9M
     CGroup: /system.slice/bareos-director.service
             └─57070 /usr/sbin/bareos-dir -f

● bareos-storage.service - Bareos Storage Daemon service
     Loaded: loaded (/lib/systemd/system/bareos-storage.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-05-05 13:38:14 EAT; 1min 23s ago
       Docs: man:bareos-sd(8)
   Main PID: 56970 (bareos-sd)
      Tasks: 2 (limit: 4578)
     Memory: 1008.0K
     CGroup: /system.slice/bareos-storage.service
             └─56970 /usr/sbin/bareos-sd -f

● bareos-filedaemon.service - Bareos File Daemon service
     Loaded: loaded (/lib/systemd/system/bareos-filedaemon.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-05-05 13:38:23 EAT; 1min 14s ago
       Docs: man:bareos-fd(8)
   Main PID: 56989 (bareos-fd)
      Tasks: 2 (limit: 4578)

Step 3. Create an Admin User

Login to Bconsole using the following command.

$ sudo bconsole
Connecting to Director localhost:9101
 Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
1000 OK: bareos-dir Version: 22.0.0~pre464.2bcade977 (28 April 2022)
pre-release version binary
pre-release versions are UNSUPPORTED.
Get a released version and vendor support on https://www.bareos.com
You are connected using the default console

Enter a period (.) to cancel a command.
*

Reload the console and create a user with a name and password. You can change the details. The command also directly disables TLS on creating the user.

*reload
*configure add console name=admin password=StrongPassword profile=webui-admin tlsenable=false

Created resource config file "/etc/bareos/bareos-dir.d/console/admin.conf":
Console {
  Name = "admin"
  Password = "StrongPassword"
  Profile = webui-admin
  TlsEnable = false
}

Exit the Bareos console

*exit

Restart the Bareos services

sudo systemctl restart bareos-dir bareos-sd bareos-fd

Step 4. Access the Bareos WebUI

Go to  http://IP_address/bareos-webui to access the Bareos WebUI. The Login page appears where you will use the credentials of the user-created above.

Once you log in, The dashboard page opens as shown below.

To back up a job, Click on Jobs then Run and select the service to backup then click Submit.

You can view the job status on the job details page as shown below.

To restores a job, click on Restore, then select the type of service to restore and select the file to restore the service to. Then click Restore

A status message shows when the restoration is complete.

You can view the status of the job on the job details page.

Conclusion

From this guide, we have learned what is Bareos Backup solution, its components, and how they interact to perform the backup jobs. We have also learned how to install Bareos on Kubuntu|KDE Neon systems. We have also seen how to access Bareos Director from the command line and the We UI. Performing a job backup, restoring a job, and checking its status is made easy from both consoles.

LEAVE A REPLY

Please enter your comment!
Please enter your name here