Thursday, April 28, 2016

Installing the Bareos server

Some background is needed before setting up the Bareos server. The Bareos backup system is based on the Bacula backup system. It consists of  a Director (the central component),  a file system agent and a storage agent. If this is the first time installation, install the backup system components on the same server for testing purposes. The installation process is divided into three stages.

  1. Setting up the Bareos repository
  2. Installing in the programs 
  3. Setting up or configuring the system
A. Setting up the repository
  1. Refer to quickstart information in official documentation for your Distro specific instruction
  2. For RedHat, it's basically
    1. add the Bareos yum repository. The repositories are here. Make sure the client version matches the Bareos server version. Choose the version of RedHat or CentOS for the target server. Download the bareos.repo file to /etc/yum.repos.d
    2. do a yum check-update to update the repositories to load them
  3. The latest verions requires the EPEL repository to be added also.
B. Installing the application
This requires a decision on the choice of database to use. Both MariaDB/MySQL and PostgeSQL are offered as option. Install bareos together with the choice of back-end. Using the example below will also install other necessary components. However, the database of choice must be installed first. For RedHat users using MariaDB/MySQL,

yum install bareos bareos-database-mysql

C. Configuring the system
After the program/application files are installed, the database has to be configured. A Bareos database has to be created, the tables within the Bareos database have to be made and the correct privileges assigned.  If this is a fresh server, install  mysql withe the following command

yum install mysql mysql-server

And then start mysql with the command: service mysqld start.

Bareos provides the script files to create the tables necessary. For MySQL/MariaDB the commands are
 
/usr/lib/bareos/scripts/create_bareos_database 
/usr/lib/bareos/scripts/make_bareos_tables 
/usr/lib/bareos/scripts/grant_bareos_privileges

Run these from a privileged or root account. If the database has just been installed, the commands would run without a problem. However, running a system without passwords is dangerous. After testing, secure this by following these instructions. Start the Bareos components to start the system
service bareos-dir start
service bareos-fd start
service bareos-sd start

Thankfully, the default installation will not only install the Director, File Daemon (agent) and Storage Daemon but also a working configuration.You can follow the instructions at the official bareos installation to do a sample test.

 If you have a different distribution or an existing server setup, refer to the Bareos installation documentation for more information and options. 


No comments:

Post a Comment