Giter Club home page Giter Club logo

bacularis-api's Introduction

Bacularis-API

Bacularis API is the main component of the Bacula programming interface.

Latest Stable Version Total Downloads License PHP Version Require

Bacularis - The Bacula web interface

Bacularis is a web interface to configure, manage and monitor Bacula backup environment. It is a complete solution for setting up backup jobs, doing restore data, managing tape or disk volumes in local and remote storage, work with backup clients, and doing daily administrative work with backups. It also supports autochanger management. Bacularis provides advanced user management and role-based access control that enable to configure it for regular users where every user can log in to the web interface and does backup and restore own computer data only.

The project consists of two web applications: the web interface and Bacula programming interface (API) with separate administrative panel. The web interface can work with multiple Bacularis API instances to configure and manage remote Bacula components.

Bacularis is a friendly fork of Baculum. It has been founded by Baculum's creator to simplify Baculum features that they could be used not only by users with strong Bacula skills but also by beginners or intermediate users.

Requirements

Before installing please make sure you have installed PHP >= 7.4 and the following PHP modules:

  • php-bcmath
  • php-curl
  • php-dom
  • php-json
  • php-ldap
  • php-mysqlnd
  • php-pdo
  • php-pgsql
  • php-intl

Installation

One of the ways to install and update Bacularis is using Composer for that.

If you don't have Composer installed, you can use the following commands to install it:

curl -s http://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Once it is done, you can install Bacularis:

composer create-project bacularis/bacularis-app

At the end you need to run as the root user an install script that will set permissions for files and directories and also that will prepare the web server configuration file:

bacularis-app/protected/tools/install.sh

Upgrade

To upgrade Bacularis you need to run the following command in the Bacularis project directory:

composer update

Documentation

Bacularis documentation is available here: https://bacularis.app/doc/

Bacularis API documentation you can find here: https://bacularis.app/api/

Live Demo

If you would like to try Bacularis before installing it, you can try live demo available at the following address:

https://demo.bacularis.app

Project homepage

The project main page is https://bacularis.app

bacularis-api's People

Contributors

ganiuszka avatar theslapist avatar webee0317 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

bacularis-api's Issues

Is openapi_bacularis.json valid and up to date?

Hi,

I am trying to parse the openapi spec to generate some client libraries on https://editor.swagger.io/ but it seems there are some issues, has it been updated to version 3.0.0? Is this spec valid?

Pasting some of the errors below:

Structural error at 
should NOT have additional properties
additionalProperty: server, definitions
Jump to line 0
Structural error at paths./api/v2/clients/{clientid}/bandwidth.put.parameters.1
should NOT have additional properties
additionalProperty: default
Jump to line 581
Structural error at paths./api/v2/clients/{clientid}/bandwidth.put.parameters.1.in
should be equal to one of the allowed values
allowedValues: path, query, header, cookie
Jump to line 582
Structural error at paths./api/v2/jobs/{jobid}/cancel.put
should NOT have additional properties
additionalProperty: consumes
Jump to line 783
Structural error at paths./api/v2/jobs/{jobid}/bandwidth.put.parameters.1
should NOT have additional properties
additionalProperty: default
Jump to line 901
Structural error at paths./api/v2/jobs/{jobid}/bandwidth.put.parameters.1.in
should be equal to one of the allowed values
allowedValues: path, query, header, cookie
Jump to line 902

Editing API basic users via Web throws PHP error

Hello Everybody,

There is not possible to save edited API basic user from the Web interface (Security -> API basic users -> [user] -> Edit). This action throws PHP error. It refers only to modifying API basic user from the Bacularis Web level, not from API panel.

This bug occurs in version 2.4.0.

Workaround: To change the API basic user properties please go to the API panel and change it there.

Best regards,
Marcin Haba (gani)

File searches fail for text which isn't lower-case in a MySQL/MariaDB database

Hi there,
I'm trying to search for files using the bacularis 'search for files in job' feature, but unfortunately the search doesn't find files that have mixed case paths.

For example, if I have a path of '/home/user/Foo Bar', a search for 'oo' will find the file, a search for 'ar' will find the file, but searches for either 'foo' or 'Foo' fail to find it.

What seems to be happening is that with MySQL/MariaDB, the Path column is stored as a BLOB, and the LOWER function doesn't work on BLOBs. So Bacularis is lower-casing the search text, attempting (but failing) to lower-case the Path text, and comparing the two, and so the search doesn't match if the Path text is mixed-case.

The problem is this lower-case conversion here:
https://github.com/bacularis/bacularis-api/blob/master/API/Modules/JobManager.php#L351

The MariaDB and MySQL documentation says:

LOWER() (and UPPER()) are ineffective when applied to binary strings (BINARY, VARBINARY, BLOB). To perform lettercase conversion, CONVERT the string to a non-binary string

LOWER(CONVERT(@str USING latin1));

Changing the Bacularis JobManager.php line to

         $search_crit = " AND (LOWER(CONVERT(Path.Path USING utf8)) LIKE LOWER('%$search%') OR LOWER(CONVERT(File.Filename USING utf8)) LIKE LOWER('%$search%')) ";

fixes the problem.

(But using CAST might be better than CONVERT because both Postgres and Sqlite also support that syntax, it seems...)

Setting bacularis.users htpasswd file is not read until user is edited in "Basic users" panel.

I have repeatedly re-installed Bacularis and cannot input a password for the API users prior to install. Appears that the presence of a password for the default admin user is only acknowledged after an attempt is made to set the password via the web panel, either via the Configuration Wizard or Basic users panel item.

Is there a way to read in a pre-existing htpasswd file for the Bacularis API?

Observed in Bacularis 2.3.0 on Debian 11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.