python-bareos Module
python-bareos is a Python module to access a Bareos backup system.
Packages for python-bareos are included in the Bareos core distribution and available via https://pypi.org/project/python-bareos/.
The main functionality is to access a Bareos Director via its console interface. This is the same interface as used by the bconsole command line tool or the Bareos WebUI.
This module is not intended for Bareos Python plugins. Bareos plugins run inside the Bareos daemons, while this module connects to the Bareos Daemon constrol interfaces.
The relevant classes are:
Example:
>>> import bareos
>>> directorconsole=bareos.bsock.DirectorConsole(address='localhost', port=9101, name='user1', password='secret')
>>> print(directorconsole.call('help').decode("utf-8"))
If you want to create a command line tool, the examples in https://github.com/bareos/bareos/tree/master/python-bareos/bin might be useful.
python-bareos module. |
|
Module to access a https://www.bareos.com backup system. |
|
Constants for the different Bareos connection types. |
|
Constants used by Bareos. |
|
Send and receive the response to Bareos Director Daemon Console interface. |
|
Communicate with the Bareos Director Daemon Console interface in API mode 2 (JSON). |
|
Send and receive the response to Bareos File Daemon (bareos-fd). |
|
Low Level socket methods to communicate with a Bareos Daemon. |
|
Protocol Message Ids |
|
Protocol messages between bareos-director and user-agent. |
|
Bareos Protocol Versions. |
|
Classes to parse TLS version paramters. |
|
Bareos utility classes. |
|
Bareos specific base64 implementation. |
|
Handle Bareos passwords. |
|
Handle file paths. |
|
Bareos specific exceptions. |