Client library and tools for Bareos console access.
Project description
python-bareos
python-bareos is a Python module to access a http://www.bareos.org backup system.
Packages for python-bareos are included in the Bareos core distribution since Bareos >= 17.2.
Optional Requirements
TLS-PSK
Since Bareos >= 18.2.4, Bareos can use TLS-PSK (Transport-Layer-Security Pre-Shared-Key) to secure its network connections.
This subset of TLS is currently not supported by the Python SSL module. To enable this feature in python-bareos the Python module sslpsk must be installed:
pip install sslpsk
Examples
Calling bareos-director user agent commands
import bareos.bsock
password = bareos.bsock.Password('secret')
directorconsole = bareos.bsock.DirectorConsole(address='localhost', port=9101, password=password)
print directorconsole.call('help')
...
To connected to a named console instead, use the name parameter:
password = bareos.bsock.Password('secret')
directorconsole=bareos.bsock.DirectorConsole(address='localhost', port=9101, name='user1', password=password)
Simple version of the bconsole in Python
import bareos.bsock
password = bareos.bsock.Password('secret')
directorconsole = bareos.bsock.DirectorConsole(address='localhost', port=9101, password=password)
directorconsole.interactive()
...
or use the included bconsole.py script:
bconsole.py –debug –name=user1 –password=secret –port 9101 localhost
Use JSON objects of the API mode 2
Requires: Bareos >= 15.2
import bareos.bsock
password = bareos.bsock.Password('secret')
directorconsole = bareos.bsock.DirectorConsoleJson(address='localhost', port=9101, password=password)
pools = directorconsole.call('list pools')
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_bareos-19.2.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c2d9a4b2551316d630f1a972b768a0cabc3f65dff051b6aee5ad5d3d3ec0112 |
|
MD5 | df988f0efbe29a8323a2043798128568 |
|
BLAKE2b-256 | c11ae1d20790750c239b3c226d1e28ef742483e287676a50ee8ed0f24f65a3f6 |