Basic information

API capabilities

Baculum Web works with Baculum API hosts. One Baculum Web can manage many Baculum API hosts using the same one web interface. The API hosts can be installed in remote locations and they are responsible for doing the following tasks:

  • configure Bacula components like: director, file daemon, storage daemon or bconsole.

  • autochanger management with actions like: load, unload, label with/without barcodes, transfer tapes between slots and others.

  • start, stop and restart Bacula components

  • get information from the Bacula catalog database about jobs, volumes, clients, pools, filesets and others.

  • run bconsole commands like estimate, prune, purge, status, run and others

The listed above API functions can be enabled/disabled independently of other functions. This way there is possible to compose API hosts tailored to current needs. For example if you have a host with Bacula storage daemon and you would like to manage the storage daemon configuration then you can install Baculum API on this host, enable the storage daemon configuration capability and connect this Baculum API host to Baculum Web. After that you will be able to manage the remote storage daemon configuration from the Baculum Web interface.

Blow is listed what is needed to enable each of the API capabilities:

  • configure Bacula components - there is needed to have the following Bacula JSON tools:

    • For director it is program called bdirjson

    • For storage daemon it is program called bsdjson

    • For file daemon it is program called bfdjson

    • For bconsole it is program called bbconsjson

    Paths for them have to be defined in Baculum API on the Settings page in the Config tab.

  • autochanger management - you can add on the Baculum API web panel devices, that will be managed by this API host. Also optionally you can enable access to the catalog database to get detailed information about volumes in the autochanger device view. Both the devices and the catalog access are possible to setup on the Baculum API Settings page.

  • start, stop and restart Bacula components - these capabilities are called in Baculum API as “Actions” and to enable them you will need to define in the API panel the commands used in your system to start, stop or restart Bacula component. For example it can be systemd specific systemctl command any other, which is capable to do required action. Actions can be defined in Baculum API on the Settings page in the Actions tab.

  • get information from the Bacula catalog database - to setup the catalog access you need to define in the API panel the Bacula database connection parameters. It can be done in Baculum API on the Settings page in the Catalog tab.

  • run bconsole commands - to enable the bconsole capability in Baculum API you need to define bconsole program and bconsole configuration file. You can define it on the Baculum API Settings page in the Console tab.

../_images/baculum_remote_host_management.png

Host connection

Each configured Baculum API host can be connected to the Baculum Web interface. Host binding is realized the same way for local and remote hosts. In communication between Baculum API and Baculum Web there is no difference if host is local or remote because all are treated the same. Also all of them use HTTP(S) protocol to communicate.

In normal work Baculum Web requires that first added Baculum API instance must provide miminum the catalog and the bconsole capabilities. This instance on the Baculum Web side is named “Main” and it is added during the Baculum Web installation (in the installation wizard). Each next the Baculum API instance added to Baculum Web does not have this type restriction.

Bacula configuration

If you decide to enable in the Baculum API the configuration capability for some of the Bacula components, then you will be able to configure these components via the Baculum Web interface. You will see new configuration functions available on the interface like edit, create and delete Bacula component configuration.

All changes introduced in configuration by the Baculum Web interface are at the same time applied on the host with the Bacula component for which the configuration belongs to. It means that saving all configuration changes is done in a synchronous way and they are real time changes. In moment, when Baculum administrator clicks save button, changes are sent directly to remote host. On Baculum Web host is not stored any Bacula component configuration.

After successful saving Bacula configuration if changes were done for director component, there is automatically reloaded the Bacula director configuration. For other components to refresh configuration there is needed to restart the component using Baculum actions function or restart it manually in the command line.