Home / How To / How to install Bareos Backup Solution on Ubuntu 18.04 LTS

How to install Bareos Backup Solution on Ubuntu 18.04 LTS



Bareos stands for "Backup Archiving Recovery Open Sourced" is a free and open source backup source from Bacula.org. It is a platform software that can be used for backup, archiving and data recovery for all operating systems. It is made of three components including the Bareos Director, Storage Daemons and File Daemons. A brief explanation of each component is shown below:

The Director is the central control unit for all demons and is responsible for managing databases, connected clients and configuring plugins. File Daemon is responsible for managing backups and restores processes. The storage daemon receives data from one or more File Daemons and stores data on the configured security media.

Features

  • Support native NDMP.
  • Support client quota.
  • Support for hardware encryption with LTO.
  • Bandwidth limitation.
  • File set shading deduplication.
  • Support VMware plugin to backup VMware disk image.
  • Support LDAP Plug-in for Backup LDAP Directories
  • Gluster and Ceph Plugins for Backup Cloud Storage

If you are looking for an easier way to manage your enterprise backups than Bareos is the best choice for you.

In this tutorial, we will show how to install Bareos and Bareos WebUI on Ubuntu 18.04 server.

Prerequisites [19659015] A server running Ubuntu 18.04.
  • A root password is configured on your server.
  • Getting Started

    Before you begin, it is recommended that you update the system package inventory to the latest version. You can do this with the following command:

      apt-get update -y 
    apt-get upgrade -y

    When you are finished, you can proceed to the next step.

    Install Bareos [19659018] By default, Bareos is not available in the Ubuntu 18.04 standard repository. So you need to add the bareos layer to your system.

    You can add it with the following command:

      echo "deb http://download.bareos.org/bareos/release/latest/xUbuntu_18.04 /"> /etc/apt/sources.list.d /bareos.list??19659020??Next, download and add the GPG key with the following command:     

      wget - q http://download.bareos.org /bareos/release/latest/xUbuntu_18.04/Release.key -O- | apt-key add - 

    Then update the repository with the following command:

      apt-get update -y 

    Once the repository has been updated, install Bareos with the MariaDB server by running the following command: [19659024] apt- get install mariadb-server bareos bareos-database-mysql -y

    During installation, you will be asked to select the email server configuration type displayed on the following screen:

     Email Configuration [19659013] Select Local only and press Enter to continue. You will be prompted to enter your system message name displayed on the following screen:

     System record name

    Enter your system mail name and press Enter to continue. You will be prompted to use dbconfig to configure the Bareos database displayed on the following screen:

     Configure the database

    Select Yes and hit Enter to continue. You will be prompted to provide MySQL passwords for the Bareos database as follows:

     MySQL Application Passwords

    Ge your desired password and press Enter to continue. You will be asked to confirm the password shown below:

     Confirm Password

    Confirm Password and press Enter to complete the installation.

    By default, all bareos configurations are stored in the / etc / bareos / directory. You can list them with the following command:

      tree / etc / bareos / 

    You should see all bareos files and directories in the following output: Advertising Services

      / etc / bareos /
    ??? bareos-dir.d
    ? ??? catalog
    ? ? ??? MyCatalog.conf
    ? ??? client
    ? ? ??? bareos-fd.conf
    ? ??? comfort
    ? ? ??? bareos-mon.conf
    ? ??? director
    ? ? ??? bareos-dir.conf
    ? ??? fileset
    ? ? ??? Catalog.conf
    ? ? ??? LinuxAll.conf
    ? ? ??? SelfTest.conf
    ? ? ??? Windows All Drives.conf
    ? ??? Job
    ? ? ??? backup bareos-fd.conf
    ? ? ??? BackupCatalog.conf
    ? ? ??? RestoreFiles.conf
    ? ??? jobdefs
    ? ? ??? DefaultJob.conf
    ? ??? messages
    ? ? ??? Daemon.conf
    ? ? ??? Standard.conf
    ? ??? merge
    ? ? ??? Differential.conf
    ? ? ??? Full.conf
    ? ? ??? Incremental.conf
    ? ? ??? Scratch.conf
    ? ??? profile
    ? ? ??? operator.conf
    ? ??? schedule
    ? ? ??? WeeklyCycleAfterBackup.conf
    ? ? ??? WeeklyCycle.conf
    ? ??? storage
    ? ? ??? File.conf
    ? ??? user
    ??? bareos-dir exports
    ? ??? client
    ??? bareos-fd.d
    ? ??? client
    ? ? ??? myself.conf
    ? ??? director
    ? ? ??? bareos-dir.conf
    ? ? ??? bareos-mon.conf
    ? ??? messages
    ? ??? Standard.conf
    ??? bareos-sd.d
    ? ??? unit
    ? ? ??? FileStorage.conf
    ? ??? director
    ? ? ??? bareos-dir.conf
    ? ? ??? bareos-mon.conf
    ? ??? messages
    ? ? ??? Standard.conf
    ? ??? storage
    ? ??? bareos-sd.conf
    ??? bconsole.conf
    

    When you're done, you can move on to the next step.

    Install Bareos Web Interface.

    Bareos also provides WebUI to monitor and manage Bareos. It is a free software tool written in PHP and based on the Zend Framework. It is intended to monitor and manage Bareos via the Web. You can easily perform backup and restore operations with the Bareos dashboard. You can install it by running the following command:

      apt-get install bareos-webui -y 

    This will install Apache web server, PHP and other PHP extensions in your system. When the installation is complete, you must reload the Apache service to apply the changes. You can restart it with the following command:

      systemctl reload apache2 

    Then you start all the Bareos services with the following command:

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

    You can also see the status of all services with the following command:

      systemctl status bareos-dir bareos-sd bareos-fd 

    You should see the following output:

    ? bareos-director.service - Bareos Director Daemon service
    Loaded: loaded (/lib/systemd/system/bareos-director.service; enabled; vendor setting: enabled)
    Active: active (running) since Sat 2020-04-04 07:21:03 UTC; 7s ago
    Document: man: bareos-dir (8)
    Process: 19182 ExecStart = / usr / sbin / bareos-dir (code = terminated, status = 0 / SUCCESS)
    Process: 19171 ExecStartPre = / usr / sbin / bareos-dir -t -f (code = terminated, status = 0 / SUCCESS)
    Main PID: 19189 (bareos-dir)
    Details: 4 (limit: 2359)
    CGroup: /system.slice/bareos-director.service
    ?? 19189 / usr / sbin / bareos-dir
    
    04 Apr 07:21:03 ubuntu1804 systemd [1]: Start Bareos Director Daemon service ...
    Apr 04 07:21:03 ubuntu1804 systemd [1]: bareos-director.service: Unable to open PID file /var/lib/bareos/bareos-dir.9101.pid (yet?) After boot: no
    April 04 07:21:03 ubuntu1804 systemd [1]: Started the Bareos Director Daemon service.
    
    ? bareos-storage.service - Bareos Storage Daemon service
    Loaded: loaded (/lib/systemd/system/bareos-storage.service; enabled; vendor setting: enabled)
    Active: active (running) since Sat 2020-04-04 07:21:03 UTC; 7s ago
    Document: man: bareos-sd (8)
    Process: 19172 ExecStart = / usr / sbin / bareos-sd (code = terminated, status = 0 / SUCCESS)
    Main PID: 19181 (bareos-sd)
    Details: 2 (limit: 2359)
    CGroup: /system.slice/bareos-storage.service
    ?? 19181 / usr / sbin / bareos-sd
    
    Apr 04 07:21:03 ubuntu1804 systemd [1]: Launch Bareos Storage Daemon service ...
    Apr 04 07:21:03 ubuntu1804 systemd [1]: bareos-storage.service: Unable to open PID file /var/lib/bareos/bareos-sd.9103.pid (yet?) After boot: None su
    Apr 04 07:21:03 ubuntu1804 systemd [1]: Started Bareo's Storage Daemon service.
    
    ? bareos-filedaemon.service - Bareos File Daemon service
    Loaded: loaded (/lib/systemd/system/bareos-filedaemon.service; enabled; vendor setting: enabled)
    Active: active (running) since Sat 2020-04-04 07:18:11 UTC; 2min 58s ago
    Document: man: bareos-fd (8)
    Main PID: 3469 (bareos-fd)
    Details: 2 (limit: 2359)
    CGroup: /system.slice/bareos-filedaemon.service
    ?? 3469 / usr / sbin / bareos-fd
    
    

    When you're done, you can move on to the next step.

    Creating the Bareo administrative user

    Then you must create an administrator user to access WebUI.

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

      bconsole 

    When connected, you should get the following output: Ads

    [19659059] Connects to Director localhost: 9101
    Encryption: ECDHE-PSK-CHACHA20-POLY1305
    1000 OK: bareos-dir Version: 18.2.5 (January 30, 2019)
    bareos.org build binary
    bareos.org binaries are not supported by bareos.com.
    Get official binary and vendor support at https://www.bareos.com
    You are connected with the standard console
    Specify a period to cancel a command.

    Then run the following command to create an admin user and enter a password for it:

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

    You should get the following output: [19659059] Created resource configuration file "/etc/bareos/bareos-dir.d/console/admin.conf":
    Console {
    Name = admin
    Password = password
    Profile = webui-admin
    }

    Then quit from the Bareos console with the following command:

      quit 

    Then you must also disable TLS in Bareos. You can do so by editing the admin.conf file:

      nano /etc/bareos/bareos-dir.d/console/admin.confebrit19659020vudAdd the line "TLS Enable = No" as shown below: 

     Console {
    Name = admin
    Password = password
    Profile = webui-admin
    TLS Enable = No.
    }
    

    Save and close the file when you are done. Then restart all Bareos services to apply the changes:

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

    When you're done, you can move on to the next step.

    Access the Bahar Web Interface

    At this point, Bahar and Bahar WebUI are installed and configured. It's time to access their WebUI.

    Open your browser and enter the URL http: // your-server-ip / bareos-webui . You will be redirected to the Bareos login page shown below:

     Bareos Login [19659013] Enter your username, password and click Log in . You should see the Bahar standard panel on the following screen:

     Bareos Backup Dashboard

    Conclusion

    Congratulations! you have installed Bareos and Bareos WebUI on Ubuntu 18.04 server. You can now start exploring Bareos WebUI to monitor and manage your business backup. For more information, please visit the Bahrain documentation page. Feel free to ask me if you have any questions.


    Source link