Atlantic.Net Blog

How To Setup Bareos Backup Solution On CentOS 8

Hitesh Jethva
by Atlantic.Net (125posts) under VPS Hosting
0 Comments

Bareos, also called “Backup Archiving Recovery Open Sourced,” is an open-source software used for backing up and protecting data. It is cross-platform and supports all major operating systems including Linux, Windows, MacOS and Unix. Bareos comes with a simple and user-friendly web interface that helps you to perform backup operations through a web browser.

Bareos consists of several components, including the Backup Directory, Control Unit, Storage Daemons, and File Daemons. The Director is the controller for the other daemons, while the File Daemons are responsible for backing up the data from the client.

In this tutorial, we will learn how to install the Bareos backup application on CentOS 8.

Prerequisites

  • A fresh CentOS 8 VPS on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server.  Create a new server, choosing CentOS 8 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged into your CentOS 8 server, run the following command to update your base system with the latest available packages.

dnf update -y

Step 2 – Install LAMP Server

Bareos uses MariaDB or MySQL as a database backend. You will need to install the MariaDB database server, Apache and PHP in your system. You can install them with the following command:

dnf install httpd mariadb-server php php-cli php-common -y

Once all the packages are installed, start the Apache and MariaDB services and enable them to start at system reboot with the following command:

systemctl start httpd
systemctl enable httpd
systemctl start mariadb
systemctl enable mariadb

Step 3 – Install Bareos

By default, the Bareos is not available in the CentOS 8 default repository. You will need to download the Bareos repo from their official website.

You can download it with the following command:

wget -O /etc/yum.repos.d/bareos.repo http://download.bareos.org/bareos/release/latest/CentOS_8/bareos.repo

Next, install the Bareos server by running the following command:

dnf install bareos bareos-database-mysql -y

Once all the packages are installed, start all Bareos services and enable them to start at boot with the following command:

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

systemctl enable bareos-dir
systemctl enable bareos-sd
systemctl enable bareos-fd

Step 4 – Prepare Bareos Database

Next, you will need to create a database and table for Bareos.

First, create a database with the following command:

/usr/lib/bareos/scripts/create_bareos_database

You should get the following output:

Creating mysql database
Creating of bareos database succeeded.

Next, create a database table with the following command:

/usr/lib/bareos/scripts/make_bareos_tables

You should get the following output:

Making mysql tables

Creation of Bareos MySQL tables succeeded.

Next, grant all the privileges to the Bareos with the following command:

/usr/lib/bareos/scripts/grant_bareos_privileges

You should get the following output:

Granting mysql tables
Privileges for user bareos granted ON database bareos.

Step 5 – Install Bareos Web UI

First, you will need to install EPEL repo in your system. You can install it with the following command:

dnf install epel-release -y

Once installed, you can run the following command to install the Bareos WebUI.

dnf install bareos-webui -y

Once the installation is completed, restart the httpd and Bareos services with the following command:

systemctl restart httpd
systemctl restart bareos-dir bareos-sd bareos-fd

Next, you will need to create an admin user and password for Bareos WebUI.

To do so, login to Bareos console with the following command:

bconsole

You should get the following output:

Connecting to Director localhost:9101
 Encryption: TLS_CHACHA20_POLY1305_SHA256
1000 OK: bareos-dir Version: 19.2.7 (16 April 2020)
bareos.org build binary
bareos.org binaries are UNSUPPORTED by bareos.com.
Get official binaries and vendor support on https://www.bareos.com
You are connected using the default console
Enter a period (.) to cancel a command.

Next, run the following command to create an admin user and password:

configure add console name=admin password=admin123 profile=webui-admin

You should get the following output:

Created resource config file "/etc/bareos/bareos-dir.d/console/admin.conf":

Console {
  Name = admin
  Password = admin123
  Profile = webui-admin
}

Next, exit from the Bareos console and edit the Bareos admin configuration file:

nano /etc/bareos/bareos-dir.d/console/admin.conf

Add the “TLS Enable = No” line as shown below:

Console {
  Name = admin
  Password = admin123
  Profile = webui-admin
 TLS Enable = No

}

Save and close the file, then restart the Bareos service with the following command:

systemctl restart bareos-dir bareos-sd bareos-fd

Step 6 – Access Bareos WEB UI

Now, open your web browser and access the Bareos Web UI using the URL http://your-server-ip/bareos-webui. You will be redirected to the following page:

Provide your admin username, password and click on the Login button. You should see the Bareos dashboard in the following page:

Congratulations! You have successfully installed and configured Bareos backup application on CentOS 8. Now, you can add your first Bareos client and create a job for it to run on a regular basis – get started with Bareos on Atlantic.Net VPS Hosting today!

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources