Bacula Web interface
Clone or download
Latest commit 182d977 May 24, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Fix typo Mar 9, 2017
utils bugfix Sep 13, 2016
.gitignore Base core functionality Jan 14, 2016
LICENSE added license Sep 16, 2016
README.md Added snyk badge May 24, 2018
config.py.example Base core functionality Jan 14, 2016
requirements.txt Merge branch 'master' into pyup-update-werkzeug-0.11.15-to-0.12.2 Jul 26, 2017
run.py disable debug by default; add sortable tables to old volumes and mark… Mar 21, 2016

README.md

pyWBacula v0.1

Another one simple bacula web reports interface.

I wasn't satisfied with current web interfaces for bacula. Cause they show default information which I can get from console and doesn't show really useful information (like big files in backup, long-running-backups etc).

So as a result I start writing own web reports interface.

#Requirements

  • Enabled bacula history for jobs
  • PostgreSQL database (I use postgres on all my servers with bacula)
  • python Flask

#Documentation Instalation notes

#Notes

  • requirements.txt contains modules which I use in my web interface
  • css is based on SemanticUI (http://semantic-ui.com/)
  • for database connection I use SQLAlchemy

Installation

Download

git clone https://github.com/l13t/pyWBacula.git

Prepare and enable virtual enviroment

cd pyWBacula
virtualenv venv
source venv/bin/activate

Install python modules

pip install -r requirements.txt

Modify configuration files

After downloading you should rename next configuration files:

cp config.py.example config.py cp app/config.py.example app/config.py

app/config.py syntax

  • DB_URI:

DB_URI = 'postgresql://<user>:<password>@<host>:<port>/<db_name>?client_encoding=utf8'

Currently only PostgreSQL supported.

Run application

Run in standalone mode

You can use run.py to start application:

./run.py

Or you can use gunicorn:

venv/bin/gunicorn --bind 0.0.0.0:15995 run:app

Run on startup

To run on startup just do next steps:

cp utils/pywbacula /etc/init.d/
chmod 755 /etc/init.d/pywbacula && chown root:root /etc/init.d/pywbacula
update-rc.d pywbacula defaults
update-rc.d pywbacula enable

Edit /etc/init.d/pywbacula to change WWW_HOME and APP_USER variables.

Grafana+InfluxDB reports

In utils you can find scripts which would help you create graph reports with Grafana+InfluxDB.

  • utils/bacula_to_influx - custom cronjob to push data to InfluxDB
  • utils/results_to_influx.sh - script which push data to InfluxDB
  • utils/grafana_panel_template.json - dashboard template for Grafana to show results

Known Vulnerabilities