Warning: This document is for the development version of Bareos Documentation. The main version is bareos-24.

Operating Systems

The Bareos project provides packages that have been released on http://download.bareos.org/bareos/release/.

Additionally, the following table gives an overview on the available package versions and the operating systems, respectively:

Operating Systems

Version

Client Daemon

Director Daemon

Storage Daemon

Linux

Arch Linux

X

X

X

CentOS

current

v12.4

v12.4

v12.4

Debian

current

v12.4

v12.4

v12.4

Fedora

current

v12.4

v12.4

v12.4

Gentoo

X

X

X

openSUSE

current

v12.4

v12.4

v12.4

RHEL

current

v12.4

v12.4

v12.4

SLES

current

v12.4

v12.4

v12.4

Ubuntu

current

v12.4

v12.4

v12.4

Univention Corporate Linux

App Center

v12.4

v12.4

v12.4

MS Windows

MS Windows 32bit

10/8/7

v12.4

v15.2

v15.2

2008/Vista/2003/XP

v12.4–v14.2

MS Windows 64bit

10/8/2012/7

v12.4

v15.2

v15.2

2008/Vista

v12.4–v14.2

Mac OS

Mac OS X/Darwin

v14.2

BSD

FreeBSD

>= 11

v19.2

v19.2

v19.2

OpenBSD

X

NetBSD

X

Unix

AIX

>= 4.3

com-13.2

*

*

HP-UX

com-13.2

Solaris (i386/Sparc)

>= 11

com-12.4

com-12.4

com-12.4

vVV.V

starting with Bareos version VV.V, this platform is official supported by the Bareos.org project

com-VV.V

starting with Bareos version VV.V, this platform is supported. However, pre-build packages are only available from Bareos.com

X

known to work

*

has been reported to work by the community

Linux

Universal Linux Client

The Bareos project provides packages for the current releases of all major Linux distributions. In order to support even more platforms Bareos Version >= 21.0.0 provides the so called Universal Linux Client (ULC).

The Universal Linux Client is a Bareos File Daemon, built in a way to have minimal dependencies to other libraries.

Note

The Universal Linux Client depends on the OpenSSL library of the host in order to utilize security updates for this library.

It incorporates all functionality for normal backup and restore operations, however it has only limited plugin support.

Currently it is provided as a Debian package. However, it is planed to provide it also in other formats.

The ULC have extra repositories, their names starting with ULC_ (e.g. ULC_deb_OpenSSL_1.1) at https://download.bareos.org/bareos/release/. There will be different repositories depending on packaging standard and remaining dependencies. These repositories contain the bareos-universal-client package and sometimes their corresponding debug package. You can either add the repository to your system or only download and install the package file.

One of ULC’s goals is to support new platforms for which native packages are not yet available. As soon as native packages are available, their repository can be added and on an update the ULC package will be seamlessly replaced by the normal Bareos File Daemon package. No change to the Bareos configuration is required.

Warning

While ULC packages are designed to run on as many Linux platforms as possible, they should only be used if this platform is not directly supported by the Bareos project. When available, native packages should be preferred.

Feature overview:

  • Single package installation

  • Repository based installation

  • Minimal dependencies to system libraries (except OpenSSL)

  • Uses host OpenSSL library

  • Replaceable by the normal Bareos File Daemon. No configuration change required.

Univention Corporate Server >= 5

The Univention Corporate Server (UCS) is an enterprise Linux distribution based on Debian.

For UCS releases < 5.0, Bareos offers extended integration into UCS and provides its software also via the App Center. With version 5.0 of the UCS App Center the method of integration changed requiring commercially not reasonable efforts for deep integration.

Bareos continues to support UCS with the same functionality as the other Linux distributions.

During the build process, Bareos Debian 10 packages are automatically tested on an UCS 5.0 system. Only packages that passes this acceptance test, will get released by the Bareos project.

Note

While Bareos offers a software repository for UCS >= 5, this repository is identical with the corresponding Debian repository. The included APT sources file will also refer to the Debian repository.

Univention Corporate Server 4.x

Preamble

The Univention Corporate Server is an enterprise Linux distribution based on Debian. It consists of an integrated management system for the centralised administration of servers, computer workplaces, users and their rights as well as a wide range of server applications. It also includes an Unvention App Center for the easy installation and management of extensions and appliances.

Bareos <= 21 is part of the App Center and therefore an Univention environment (UCS < 5) can easily be extended to provide backup functionality for the Univention servers as well as for the connected client systems. Using the Univention Management Console (UMC), you can also create backup jobs for client computers (Windows or Linux systems), without the need of editing configuration files.

The Bareos Univention App is shipped with a default configuration for the director daemon and the storage daemon.

Warning

You need to review some Univention configuration registry (UCR) variables. Most likely, you will want to set the location where the backups are stored. Otherwise, you may quickly run out of disk space on your backup server!

You will find further information under Backup Storage.

Quick Start

  • Determine the space requirements and where to store your backup data

  • Set the bareos/* UCR variables according to your needs, see UCR variables

  • Restart bareos-dir, bareos-sd and bareos-fd (or simply reboot the server)

  • Install the Bareos file daemon on clients and copy Director configuration resource file from

    • /etc/bareos/bareos-dir-export/client/<clientname>-fd/bareos-fd.d/director/*.conf

    • (or /etc/bareos/autogenerated/client-configs/<hostname>.conf, if Bareos < 16.2.0)

    For details, see Add a client to the backup.

  • Enable backup jobs for clients in the Univention Management Console

UCR variables

bareos/filestorage

: /var/lib/bareos/storage (default)

  • Location where to store the backup files. Make sure, it offers enough disk space for a configured backup volumes.

bareos/max_full_volume_bytes

: 20 (default)

bareos/max_full_volumes

: 1 (default)

bareos/max_diff_volume_bytes

: 10 (default)

bareos/max_diff_volumes

: 1 (default)

bareos/max_incr_volume_bytes

: 1 (default)

bareos/max_incr_volumes

: 1 (default)

bareos/backup_myself

: no (default)

no

don’t backup the server itself

yes

backup the server itself

bareos/webui/console/user1/username

: Administrator (default)

  • User name to login at the bareos-webui

bareos/webui/console/user1/password

: (no default value)

  • Password to login at the bareos-webui

UCR variables can be set via the Univention Configuration Registry Web interface

../_images/univention-configuration-registry-settings.png

or using the ucr command line tool:

Enable backup of the server itself
root@ucs:~# ucr set bareos/backup_myself=yes
Setting bareos/backup_myself
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.

Warning

univention-bareos < 15.2 did require a manual reload/restart of the bareos-dir service:

let bareos-dir reload its configuration
root@ucs:~# service bareos-dir reload
[ ok ] Reloading Bareos Director: bareos-dir.

Setup

After installation of the Bareos app, Bareos is ready for operation. A default configuration is created automatically.

Bareos consists of three daemons called director (or bareos-dir), storage-daemon (or bareos-sd) and filedaemon (or bareos-fd). All three daemons are started right after the installation by the Univention App Center.

If you want to enable automatic backups of the server, you need to set the Univention configuration registry (UCR) variable bareos/backup_myself to yes and reload the director daemon.

Administration

For general tasks the bareos-webui can be used. Additional, there is the bconsole command line tool:

Starting the bconsole
root@ucs:~# bconsole
Connecting to Director ucs:9101
1000 OK: ucs-dir Version: 15.2.2 (15 November 2015)
Enter a period to cancel a command.
*

For general information, see the Bconsole Tuturial.

Backup Schedule

As a result of the default configuration located at the bareos-dir, the backup schedule will look as follows:

Full Backups
  • are written into the Full (Dir->Pool) pool

  • on the first saturday at 21:00 o’clock

  • and kept for 365 days

Differential Backups
  • are written into the Differential (Dir->Pool) pool

  • on every 2nd to 5th saturday at 21:00 o’clock

  • and kept for 90 days

Incremental Backups
  • are written into the Incremental (Dir->Pool) pool

  • on every day from monday to friday at 21:00 o’clock

  • and kept for 30 days

That means full backups will be written every first saturday at 21:00 o’clock, differential backups every 2nd to 5th saturday at 21:00 o’clock and incremental backups from monday to friday at 21:00 o’clock. So you have got one full backup every month, four weekly differential and 20 daily incremental backups per month.

This schedule is active for the Univention server backup of itself and all other clients, which are backed up through the bareos-dir on the Univention server.

There is also a special backup task, which is the Bareos backups itself for a possible disaster recovery. This backup has got its own backup cycle which starts after the main backups. The backup consists of a database backup for the metadata of the Bareos backup server and a backup of the Bareos configuration files under /etc/bareos/.

Backup data management

Data from the backup jobs is written to volumes, which are organized in pools (see chapter Pool Resource).

The default configuration uses three different pools, called Full (Dir->Pool), Differential (Dir->Pool) and Incremental (Dir->Pool), which are used for full backups, differential and incremental backups, respectively.

If you change the UCR variables, the configuration files will be rewritten automatically. After each change you will need to reload the director daemon.

Example for changing the Full pool size to $10 ast 20$ GB
root@ucs:~# ucr set bareos/max_full_volumes=10
Setting bareos/max_full_volumes
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.
root@ucs:~# ucr set bareos/max_full_volume_bytes=20
Setting bareos/max_full_volume_bytes
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.

Warning

This only affects new volumes. Existing volumes will not change there size.

Backup Storage

Warning

Using the default configuration, Bareos will store backups on your local disk. You may want to store the data to another location to avoid using up all of your disk space.

The location for backups is /var/lib/bareos/storage in the default configuration.

For example, to use a NAS device for storing backups, you can mount your NAS volume via NFS on /var/lib/bareos/storage. Alternatively, you can mount the NAS volume to another directory of your own choice, and change the UCR variable bareos/filestorage to the corresponding path. The directory needs to be writable by user bareos.

Example for changing the storage path
root@ucs:/etc/bareos# ucr set bareos/filestorage=/path/to/your/storage
Setting bareos/filestorage
File: /etc/bareos/...

Warning

You need to restart the Bareos storage daemon after having changed the storage path:

root@ucs:/# service bareos-sd restart

Bareos Webui Configuration

After installation you just need to setup your login credentials via UCR variables. Therefore, set the Univention configuration registry (UCR) variable bareos/webui/console/user1/username and bareos/webui/consoles/user1/password according to your needs. The director configuration is automatically reloaded if one of those two variables changes.

Alternatively you can also set those UCR variables via commandline.

Example for changing webui login credentials
root@ucs:~# ucr set bareos/webui/console/user1/username="bareos"
Setting bareos/webui/console/user1/username
File: /etc/bareos/...
[ ok ] Reloading Bareos Director: bareos-dir.
root@ucs:~# ucr set bareos/webui/console/user1/password="secret"
Setting bareos/webui/console/user1/password
File: /etc/bareos/...
[ ok ] Reloading Bareos Director: bareos-dir.

When your login credentials are set, you can login into Bareos Webui by following the entry in your Administration UCS Overview or directly via https://<UCS_SERVER>/bareos-webui/.

../_images/univention-ucs-overview-administration.png

Add a client to the backup

Overview
  • Install the Bareos client software on the target system, see Adding a Bareos Client

  • Use the Univention Management Console to add the client to the backup, see the screenshot below

  • Copy the filedaemon resource configuration file from the Univention server to the target system

Bareos >= 16.2.4

Server-side

The Univention Bareos application comes with an automatism for the client and job configuration. If you want to add a client to the Bareos director configuration, you need use the Univention Management Console, select the client you want to backup and set the enable backup job checkbox to true, as shown in the screenshot below.

../_images/univention-client-job-activation.png

If the name of the client is testw1.example.com, corresponding configuration files will be generated:

  • /etc/bareos/autogenerated/clients/testw1.example.com.include

  • /etc/bareos/bareos-dir-export/client/testw1.example.com-fd/bareos-fd.d/director/bareos-dir.conf

Generated configuration files under /etc/bareos/bareos-dir-export/client/ are intended for the target systems. After you have installed the Bareos client on the target system, copy the generated client configuration over to the client and save it to following directories:

  • on Linux: /etc/bareos/bareos-fd.d/director/

  • on Windows: C:Program FilesBareosbareos-fd.d/director/

copy client configuration from the server to the testw1.example.com client (Linux)
root@ucs:~# CLIENTNAME=testw1.example.com
root@ucs:~# scp /etc/bareos/bareos-dir-export/client/${CLIENTNAME}-fd/bareos-fd.d/director/*.conf root@${CLIENTNAME}:/etc/bareos/bareos-fd.d/director/
Background

The settings for each job resource are defined by the template files you see below:

The files

  • /etc/bareos/autogenerated/clients/generic.template

  • /etc/bareos/autogenerated/clients/windows.template

are used as templates for new clients. For Windows clients the file windows.template is used, the generic.template is used for all other client types.

If you disable the Bareos backup for a client, the client will not be removed from the configuration files. Only the backup job will be set inactive.

If you add three client, your client directory will look similar to this:

root@ucs:/etc/bareos/autogenerated/clients# ls -l
-rw-r--r-- 1 root root 430 16. Mai 15:15 generic.template
-rw-r----- 1 root bareos 513 21. Mai 14:46 testw1.example.com.include
-rw-r----- 1 root bareos 518 21. Mai 14:49 testw2.example.com.include
-rw-r----- 1 root bareos 518 16. Mai 18:17 testw3.example.com.include
-rw-r--r-- 1 root root 439 16. Mai 15:15 windows.template

The client configuration file contains, as you can see below, the client connection and the job information:

root@ucs:/etc/bareos/autogenerated/clients# cat testw2.example.com.include
Client {
 Name = "testw2.example.com-fd"
 Address = "testw2.example.com"
 Password = "DBLtVnRKq5nRUOrnB3i3qAE38SiDtV8tyhzXIxqR"
}

Job {
 Name = "Backup-testw2.example.com" # job name
 Client = "testw2.example.com-fd" # client name
 JobDefs = "DefaultJob" # job definition for the job
 FileSet = "Windows All Drives" # FileSet (data which is backed up)
 Schedule = "WeeklyCycle" # schedule for the backup tasks
 Enabled = "Yes" # this is the resource which is toggled on/off by enabling or disabling a backup from the univention gui
}
Bareos < 16.2.0

Older versions of Bareos handle generating the client configuration similar, but not identical:

If the name of the client is testw1.example.com, corresponding configuration files will be generated/adapted:

  • creates /etc/bareos/autogenerated/fd-configs/testw1.example.com.conf

  • creates /etc/bareos/autogenerated/clients/testw1.example.com.include

  • extends /etc/bareos/autogenerated/clients.include

Here the files intended for the target systems are generated under /etc/bareos/autogenerated/fd-configs/ and they do not only definr a director resource, but are full configuration files for the client. After you have installed the Bareos client on the target system, copy the generated client configuration over to the client and save it to

  • on Linux: /etc/bareos/bareos-fd.conf

  • on Windows: C:Program FilesBareosbareos-fd.conf

copy client configuration from the server to the testw1.example.com client (Linux)
root@ucs:~# CLIENTNAME=testw1.example.com
root@ucs:~# scp /etc/bareos/autogenerated/fd-configs/${CLIENTNAME}.conf root@${CLIENTNAME}:/etc/bareos/bareos-fd.conf

Debian.org / Ubuntu Universe

The distributions of Debian >= 8 include a version of Bareos. Ubuntu Universe >= 15.04 does also include these packages.

In the further text, these version will be named Bareos (Debian.org) (also for the Ubuntu Universe version, as this is based on the Debian version).

Limitations of the Debian.org/Ubuntu Universe version of Bareos

  • Debian.org does not include the libfastlz compression library and therefore the Bareos (Debian.org) packages do not offer the fileset options compression=LZFAST, compression=LZ4 and compression=LZ4HC.

  • Debian.org does not include the bareos-webui package.

Mac OS X

Bareos for macOS is available either

However, you have to choose upfront, which client you want to use. Otherwise conflicts do occur.

Both packages contain the Bareos File Daemon and bconsole.

Installing the Bareos Client as PKG

The Bareos installer package for macOS contains the Bareos File Daemon for macOS 10.5 or later.

On your local Mac, you must be an admin user. The main user is an admin user.

Download the bareos-*.pkg installer package from https://download.bareos.org/ or https://download.bareos.com/.

Find the .pkg you just downloaded. Install the .pkg by holding the CTRL key, left-clicking the installer and choosing “open”.

Follow the directions given to you and finish the installation.

Alternatively you can install the package via command line:

sudo installer -pkg bareos-*.pkg -target /

Configuration

To make use of your Bareos File Daemon on your system, it is required to configure the Bareos Director and the local Bareos File Daemon.

Configure the server-side by follow the instructions at Adding a Client.

After configuring the server-side you can either transfer the necessary configuration file using following command or configure the client locally.

The configuration path differs from a Linux installation. On Linux the configuration files are located under /etc/bareos/. On macOS pkg installations, the configuration path is /usr/local/bareos/etc/bareos/. On macOS Homebrew installatons, the configuration path is /usr/local/etc/bareos/.

Option 1: Copy the director resource from the Bareos Director to the Client

Assuming your client has the DNS entry client2.example.com and has been added to Bareos Director as client2-fd (Dir->Client):

copy director resource to a macOS pkg installation client
scp /etc/bareos/bareos-dir-export/client/client2-fd/bareos-fd.d/director/bareos-dir.conf root@client2.example.com:/usr/local/bareos/etc/bareos/bareos-fd.d/director/

This differs in so far, as on Linux the configuration files are located under /etc/bareos/, while on MacOS they are located at /usr/local/etc/bareos/.

Option 2: Edit the director resource on the Client

Alternatively, you can edit the file /usr/local/bareos/etc/bareos/bareos-fd.d/director/bareos-dir.conf.

This can be done by right-clicking the finder icon in your task bar, select “Go to folder …” and paste /usr/local/bareos/etc/bareos/bareos-fd.d/director/.

Select the bareos-dir.conf file and open it.

Alternatively you can also call following command on the command console:

open -t /usr/local/bareos/etc/bareos/bareos-fd.d/director/bareos-dir.conf

The file should look similar to this:

bareos-fd.d/director/bareos-dir.conf
Director {
  Name = bareos-dir
  Password = "SOME_RANDOM_PASSWORD"
  Description = "Allow the configured Director to access this file daemon."
}

Set this client-side password to the same value as given on the server-side.

Warning

The configuration file contains passwords and therefore must not be accessible for any users except admin users.

Restart bareos-fd after changing the configuration

The bareos-fd must be restarted to reread its configuration:

Restart the Bareos File Daemon
sudo launchctl stop  com.bareos.bareos-fd
sudo launchctl start com.bareos.bareos-fd

Verify that the Bareos File Daemon is working

Open the bconsole on your Bareos Director and check the status of the client with

*status client=client2-fd

In case, the client does not react, following command are useful the check the status:

Verify the status of Bareos File Daemon
# check if bareos-fd is started by system:
sudo launchctl list com.bareos.bareos-fd

# get process id (PID) of bareos-fd
pgrep bareos-fd

# show files opened by bareos-fd
sudo lsof -p `pgrep bareos-fd`

# check what process is listening on the |fd| port
sudo lsof -n -iTCP:9102 | grep LISTEN

You can also manually start bareos-fd in debug mode by:

Start Bareos File Daemon in debug mode
cd /usr/local/bareos
sudo /usr/local/bareos/sbin/bareos-fd -f -d 100