python-baroes

This is a Python module to interact with a Bareos Backup system.

It allows direct communiaton with the Bareos Director and access to the console commands.

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'))

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()

use JSON objects of 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) directorconsole.call('list pools')

Files