Coder Social home page Coder Social logo

bacularis / bacularis-app Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 0.0 210 KB

Bacularis - The Bacula web interface - project skeleton used as a base for rest Bacularis layers

License: Other

api backup bacula baculum configure manage mobile php web web-app web-application webgui

bacularis-app's People

Contributors

ganiuszka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bacularis-app's Issues

Amazon Cloud Driver support

Bacula15 has new amazon/s3 compatible storage driver, but bacularis has not support them, only s3 old driver based on libs3.
Please add support for Amazon driver based on aws cli tool.
There should be only one change
Driver = "Amazon"
like
Driver = "S3"
at the bacula-sd.conf Cloud definition.

Bacularis Dashboard Fails to Load Because of Scripting Error in graphs.js

Hello,

We've been using Bacularis for a few months now and really like it! In the last couple of days, I noticed my dashboard is failing to load completely. Reviewing the debug console, it appears to be an issue in graph.js. The iso_date_to_timestamp function is receiving a null and thus the function fails on its first line at iso_date.split:

var iso_date_to_timestamp = function(iso_date) { var date_split = iso_date.split(' '); var date = date_split[0].split('-'); if (date_split[1]) { var time = date_split[1].split(':'); var date_obj = new Date(date[0], (date[1] - 1), date[2], time[0], time[1], time[2]); } else { var date_obj = new Date(date[0], (date[1] - 1), date[2], 0, 0, 0); } return date_obj.getTime(); }

After looking over the script it appears that the change function called on the 'date from' must be receiving a null target.value. I assume it maybe has something to do with the change of the year to 2023 as it worked just a few days ago.

For reference, we are running Bacula 9.6.7 on Ubuntu 22.04 LTS with the current latest version of Bacularis 1.3.0 available in your Ubuntu 22 (Jammy) repo. My user agent is Chrome version 108.0.5359.125 (Official Build) (64-bit).

You all have done a great job on Bacularis! We're really happy with it and have used just about all of its abilities with zero issues prior to this!

Bacularis APP - dark theme small CSS error

Hello Marcin,

First of all, thank you for your work.
I use bacularis app version 2.5.1 as a docker container. I have discovered a CSS error in one place like in the picture:
Job_Estimate_error

After login go to: Jobs => Choose any job - Column Action - Button Details click => Button Run job => Button Estimate job => Row output

Best regards
Johann

Every 15 minute schedule

I try to use this schedule

Schedule {
Name = "daily 15 min"
Run = Level="Incremental" hourly
Run = Level="Incremental" hourly at 0:15
Run = Level="Incremental" hourly at 0:30
Run = Level="Incremental" hourly at 0:45
}

and it work and show right shedule in "status director", but wrong in web interface. Show every day at 00:00, 00:15, 00:30, 00:45 and no other.

I use debian bookwork and bacula 9.6.7, bacularis 3.0.1.

PDOException "Column not found: 1054 Unknown column 'File.Filename' in 'field list'" in BaculumAPIClient.php when trying to access Job files in Job details

Hi Marcin,

I'm afraid it's me again, and I bet this problem has a similar root cause (incorrect database structure) as issue 7 had.

The issue is that the job files table is always empty, but it is not caused by the reason described here.

Instead, the debug log says "Column not found: 1054 Unknown column 'File.Filename' in 'field list'":

2023-09-05 13:42:13 [Application] BaculumAPIClient.php:189: API REQUEST ==> https://localhost:9097/api/v2/jobs/6734/files/?offset=0&limit=100&type=saved+items&details=1&director=orion-dir

2023-09-05 13:42:13 [Application] BaculumAPIClient.php:459: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>PDOException</title>
<style type="text/css">
/*<![CDATA[*/
body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;}
h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
h3 {font-family:"Verdana";font-weight:bold;font-size:11pt}
p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px}
a {font-family:"Verdana";color:red;}
code,pre {font-family:"Lucida Console";font-size:10pt;}
td,.version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;}
.source {font-family:"Lucida Console";font-weight:normal;background-color:#ffffee;}
.error {background-color: #ffeeee;}/*]]>*/
</style>
</head>
<body>
<h1>PDOException</h1>
<h3>Description</h3>
<p style="color:maroon">SQLSTATE[42S22]: Column not found: 1054 Unknown column 'File.Filename' in 'field list'</p>
<h3>Source File</h3>
<p>/usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Modules/Database.php (252)</p>
<div class="source">
<code><pre>
0241:         $connection = JobRecord::finder()-&gt;getDbConnection();
0242:         $pdo = $connection-&gt;getPdoInstance();
0243:         if (count($params) &gt; 0) {
0244:             $statement = $pdo-&gt;prepare($sql);
0245:             foreach ($params as $param =&gt; $value) {
0246:                 $key = $param[0] === ':' ? $param : ':' . $param;
0247:                 $type = TDbCommandBuilder::getPdoType($value);
0248:                 $statement-&gt;bindValue($key, $value, $type);
0249:             }
0250:             $statement-&gt;execute();
0251:         } else {
<div class="error">0252:             $statement = $pdo-&gt;query($sql);
</div>0253:         }
0254:         return $statement-&gt;fetchAll($fetch_opts);
0255:     }
0256: }

</pre></code>
</div>
<h3>Stack Trace</h3>
<div class="source">
<code><pre>
#0 /usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Modules/Database.php(252): PDO-&gt;query()
#1 /usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Modules/JobManager.php(536): Bacularis\API\Modules\Database::findAllBySql()
#2 /usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Pages/API/JobListFiles.php(133): Bacularis\API\Modules\JobManager-&gt;getJobFiles()
#3 /usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Pages/API/JobListFiles.php(68): JobListFiles-&gt;getDetailedOutput()
#4 /usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Modules/APIServerV2.php(49): JobListFiles-&gt;get()
#5 /usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Modules/BaculumAPIServer.php(218): Bacularis\API\Modules\APIServerV2-&gt;get()
#6 /usr/share/bacularis/protected/vendor/bacularis/bacularis-api/API/Modules/BaculumAPIServer.php(201): Bacularis\API\Modules\BaculumAPIServer-&gt;runResource()
#7 ${PradoFramework}/Web/UI/TControl.php(1359): Bacularis\API\Modules\BaculumAPIServer-&gt;onInit()
#8 ${PradoFramework}/Web/UI/TCompositeControl.php(32): Prado\Web\UI\TControl-&gt;initRecursive()
#9 ${PradoFramework}/Web/UI/TTemplateControl.php(251): Prado\Web\UI\TCompositeControl-&gt;initRecursive()
#10 ${PradoFramework}/Web/UI/TPage.php(233): Prado\Web\UI\TTemplateControl-&gt;initRecursive()
#11 ${PradoFramework}/Web/UI/TPage.php(221): Prado\Web\UI\TPage-&gt;processNormalRequest()
#12 ${PradoFramework}/Web/Services/TPageService.php(547): Prado\Web\UI\TPage-&gt;run()
#13 ${PradoFramework}/Web/Services/TPageService.php(465): Prado\Web\Services\TPageService-&gt;runPage()
#14 ${PradoFramework}/TApplication.php(1262): Prado\Web\Services\TPageService-&gt;run()
#15 ${PradoFramework}/TApplication.php(386): Prado\TApplication-&gt;runService()
#16 ${DocumentRoot}/index.php(43): Prado\TApplication-&gt;run()
#17 {main}
</pre></code>
</div>
<div class="version">
2023-09-05 13:42 Apache/2.4.56 (Debian) <a href="https://github.com/pradosoft/prado">PRADO</a>/4.2.2
</div>
</body>
</html>

I've to look at the source code of some of the files mentioned in the stack trace, but I couldn't really find which database table column it is missing or what else might cause this issue.

I look forward to your help :-)

Thanks
Niels

Jobs list is not working

Hi, when I am trying to open a list of jobs by clicking on the "Jobs" item in the left panel (URL: /web/job/), I am getting the following error page:

Error
Description
Class 'ResourceBundle' not found

Source File
${PradoFramework}/I18N/core/CultureInfo.php (219)

0208: * @param string $culture the culture identifier.
0209: * @param mixed $key
0210: /
0211: protected function loadCultureData($key)
0212: {
0213: foreach (self::$bundleNames as $bundleKey => $bundleName) {
0214: if ($key == $bundleKey) {
0215: if (!array_key_exists($this->culture, self::$data)) {
0216: self::$data[$this->culture] = [];
0217: }
0218:
0219: self::$data[$this->culture][$bundleKey] = \ResourceBundle::create($this->culture, $bundleName, true);
0220: break;
0221: }
0222: }
0223: }
0224:
0225: /
*
0226: * Find the specific ICU data information from the data.
0227: * The path to the specific ICU data is separated with a slash "/".
0228: * E.g. To find the default calendar used by the culture, the path
0229: * "calendar/default" will return the corresponding default calendar.
0230: * @param string $path the data you want to find.
0231: * @param string $key bundle name.

Stack Trace
#0 ${PradoFramework}/I18N/core/CultureInfo.php(248): Prado\I18N\core\CultureInfo->loadCultureData('Core')
#1 ${PradoFramework}/Web/UI/WebControls/TDatePicker.php(579): Prado\I18N\core\CultureInfo->findInfo('calendar/gregor...')
#2 ${PradoFramework}/Web/UI/WebControls/TDatePicker.php(558): Prado\Web\UI\WebControls\TDatePicker->getCulturalOptions()
#3 ${PradoFramework}/Web/UI/WebControls/TDatePicker.php(908): Prado\Web\UI\WebControls\TDatePicker->getDatePickerOptions()
#4 ${PradoFramework}/Web/UI/WebControls/TTextBox.php(217): Prado\Web\UI\WebControls\TDatePicker->renderClientControlScript(Object(Prado\Web\UI\THtmlWriter))
#5 ${PradoFramework}/Web/UI/WebControls/TDatePicker.php(883): Prado\Web\UI\WebControls\TTextBox->addAttributesToRender(Object(Prado\Web\UI\THtmlWriter))
#6 ${PradoFramework}/Web/UI/WebControls/TWebControl.php(488): Prado\Web\UI\WebControls\TDatePicker->addAttributesToRender(Object(Prado\Web\UI\THtmlWriter))
#7 ${PradoFramework}/Web/UI/WebControls/TTextBox.php(362): Prado\Web\UI\WebControls\TWebControl->renderBeginTag(Object(Prado\Web\UI\THtmlWriter))
#8 ${PradoFramework}/Web/UI/WebControls/TWebControl.php(471): Prado\Web\UI\WebControls\TTextBox->renderBeginTag(Object(Prado\Web\UI\THtmlWriter))
#9 ${PradoFramework}/Web/UI/WebControls/TDatePicker.php(430): Prado\Web\UI\WebControls\TWebControl->render(Object(Prado\Web\UI\THtmlWriter))
#10 ${PradoFramework}/Web/UI/TControl.php(1580): Prado\Web\UI\WebControls\TDatePicker->render(Object(Prado\Web\UI\THtmlWriter))
#11 ${PradoFramework}/Web/UI/TControl.php(1610): Prado\Web\UI\TControl->renderControl(Object(Prado\Web\UI\THtmlWriter))
#12 ${PradoFramework}/Web/UI/TControl.php(1594): Prado\Web\UI\TControl->renderChildren(Object(Prado\Web\UI\THtmlWriter))
#13 ${PradoFramework}/Web/UI/TControl.php(1580): Prado\Web\UI\TControl->render(Object(Prado\Web\UI\THtmlWriter))
#14 ${PradoFramework}/Web/UI/TControl.php(1610): Prado\Web\UI\TControl->renderControl(Object(Prado\Web\UI\THtmlWriter))
#15 ${PradoFramework}/Web/UI/TForm.php(89): Prado\Web\UI\TControl->renderChildren(Object(Prado\Web\UI\THtmlWriter))
#16 ${PradoFramework}/Web/UI/TControl.php(1580): Prado\Web\UI\TForm->render(Object(Prado\Web\UI\THtmlWriter))
#17 ${PradoFramework}/Web/UI/TControl.php(1610): Prado\Web\UI\TControl->renderControl(Object(Prado\Web\UI\THtmlWriter))
#18 ${PradoFramework}/Web/UI/TControl.php(1594): Prado\Web\UI\TControl->renderChildren(Object(Prado\Web\UI\THtmlWriter))
#19 ${PradoFramework}/Web/UI/TControl.php(1580): Prado\Web\UI\TControl->render(Object(Prado\Web\UI\THtmlWriter))
#20 ${PradoFramework}/Web/UI/TControl.php(1610): Prado\Web\UI\TControl->renderControl(Object(Prado\Web\UI\THtmlWriter))
#21 ${PradoFramework}/Web/UI/TControl.php(1594): Prado\Web\UI\TControl->renderChildren(Object(Prado\Web\UI\THtmlWriter))
#22 ${PradoFramework}/Web/UI/TControl.php(1580): Prado\Web\UI\TControl->render(Object(Prado\Web\UI\THtmlWriter))
#23 ${PradoFramework}/Web/UI/TPage.php(244): Prado\Web\UI\TControl->renderControl(Object(Prado\Web\UI\THtmlWriter))
#24 ${PradoFramework}/Web/UI/TPage.php(209): Prado\Web\UI\TPage->processNormalRequest(Object(Prado\Web\UI\THtmlWriter))
#25 ${PradoFramework}/Web/Services/TPageService.php(527): Prado\Web\UI\TPage->run(Object(Prado\Web\UI\THtmlWriter))
#26 ${PradoFramework}/Web/Services/TPageService.php(464): Prado\Web\Services\TPageService->runPage(Object(JobList), Array)
#27 ${PradoFramework}/TApplication.php(1189): Prado\Web\Services\TPageService->run()
#28 ${PradoFramework}/TApplication.php(381): Prado\TApplication->runService()
#29 ${DocumentRoot}/index.php(43): Prado\TApplication->run()
#30 {main}

I am using bacularis 1.6.0 on Debian 10 (installed from a deb package).

Add support for LDAP with STARTTLS

We would like to use our LDAP service with Bacularis but it only supports connections using STARTTLS while Bacularis only offers LDAPS. From what I know STARTTLS is the current standard and the current php-ldap should also support it so it would be great to see Bacularis support for LDAP with STARTTLS added.

dark theme

hi,

Today's dark theme on the webgui is very hard on the eyes. Perhaps a dark gray palette would be less impactful.
image

#363232

Datatables warning on Dashboard and Jobs views - since update to 1.6.0

Hi,
My installation was updated to 1.6.0 this morning and since then, I get two modal message boxes each time I enter the Dashboard or the Jobs view.

Dashboard:

DataTables warning: table id=last_jobs_list - Requested unknown parameter 'filetable' for row 0, column 29. For more information about this error, please see http://datatables.net/tn/4

Jobs:

DataTables warning: table id=job_list - Requested unknown parameter 'filetable' for row 0, column 30. For more information about this error, please see http://datatables.net/tn/4

The column "File Table" appears to be a hidden column, when I select it, the column is empty (as the warnings suggest).

Volume list & volume detail: incorrect display of date in "last written" column

I have a volume that is in status Full, but has never been written to; it is on an external hard drive that ran out of space because of other volumes on the same drive.
In bconsole, the Last Written value shown is "0000-00-00 00:00:00", which in bacularis is shown as "-68118-04-26 23:58:45" (yes, a negative value!). Accordingly, the When Expire is shown in bacularis as "-66122-04-02 23:58:45".

bacularis-bug

Error while deploying client

I have installed and configured Bacula and Bacularis successfully, and everything seems to work properly.

However, there are errors when I try to deploy the client to Ubuntu or Debian (I haven't tested other systems, I am using only these two for servers).

After the Bacularis API host is successfully deployed (like in this video), I go to "Install Bacula components on API host" and try to install client (file daemon), and the following error appears in the "Raw output" tab (both server and client use Debian 12):

sudo /usr/bin/apt -y install bacula-fd 2>&1,,WARNING: apt does not have a stable CLI interface. Use with caution in scripts.,,Reading package lists...,Building dependency tree...,Reading state information...,The following additional packages will be installed:,  bacula-common,Suggested packages:,  gdb,The following NEW packages will be installed:,  bacula-common bacula-fd,0 upgraded, 2 newly installed, 0 to remove and 26 not upgraded.,Need to get 935 kB of archives.,After this operation, 2562 kB of additional disk space will be used.,Get:1 http://deb.debian.org/debian bookworm/main amd64 bacula-common amd64 9.6.7-7 [816 kB],Get:2 http://deb.debian.org/debian bookworm/main amd64 bacula-fd amd64 9.6.7-7 [119 kB],debconf: unable to initialize frontend: Dialog,debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.),debconf: falling back to frontend: Readline,debconf: unable to initialize frontend: Readline,debconf: (This frontend requires a controlling tty.),debconf: falling back to frontend: Teletype,dpkg-preconfigure: unable to re-open stdin:,Fetched 935 kB in 0s (56.8 MB/s),Selecting previously unselected package bacula-common.,(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 52076 files and directories currently installed.),Preparing to unpack .../bacula-common_9.6.7-7_amd64.deb ...,Unpacking bacula-common (9.6.7-7) ...,Selecting previously unselected package bacula-fd.,Preparing to unpack .../bacula-fd_9.6.7-7_amd64.deb ...,Unpacking bacula-fd (9.6.7-7) ...,Setting up bacula-common (9.6.7-7) ...,debconf: unable to initialize frontend: Dialog,debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.),debconf: falling back to frontend: Readline,debconf: unable to initialize frontend: Readline,debconf: (This frontend requires a controlling tty.),debconf: falling back to frontend: Teletype,Setting up bacula-fd (9.6.7-7) ...,debconf: unable to initialize frontend: Dialog,debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.),debconf: falling back to frontend: Readline,debconf: unable to initialize frontend: Readline,debconf: (This frontend requires a controlling tty.),debconf: falling back to frontend: Teletype,,Creating config file /etc/default/bacula-fd with new version,debconf: unable to initialize frontend: Dialog,debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.),debconf: falling back to frontend: Readline,debconf: unable to initialize frontend: Readline,debconf: (This frontend requires a controlling tty.),debconf: falling back to frontend: Teletype,,Creating config file /etc/bacula/bacula-fd.conf with new version,Created symlink /etc/systemd/system/multi-user.target.wants/bacula-fd.service โ†’ /lib/systemd/system/bacula-fd.service.,Processing triggers for man-db (2.11.2-2) ...,sudo /usr/share/bacularis/protected/tools/set_bacula_perm.sh /etc/bacula www-data 2>&1,Internal error. [Warning] file_put_contents(/opt/bacula/etc/bacula-dir.conf): Failed to open stream: Permission denied (@line 64 in file /opt/bacularis-app/protected/vendor/bacularis/bacularis-common/Common/Modules/ConfigBacula.php).

There was also a second attempt to deploy the client on yet another Debian 12 instance and on Ubuntu 22.04, with similar (but not the same) output. These logs are attached as files.

On Ubuntu, there was a slightly different error which was not present when try to deploy to Debian, and that was the following part of the log:

Processing triggers for systemd (245.4-4ubuntu3.22) ...,sudo /usr/share/bacularis/protected/tools/set_bacula_perm.sh /etc/bacula www-data 2>&1,Config validation error.Array
(
    [output] => JSON tool returned wrong exitcode.
 Output:sudo: /usr/sbin/bfdjson: command not found
    [exitcode] => 82
)

Here are the additional logs of another two attempts:
Bacularis-error2-debian-12.txt
Bacularis-error3-ubuntu-20.04.txt

@ganiuszka Do you have some idea what might be causing the problem?

Network test feature: results not picked up in UI

Hi,

I've just noticed the new Network test feature in the release notes - what a cool feature! However, I've tried it and on my system it doesn't seem to work properly.

The test is triggered, is being performed by Bacula (that is visible in Raw output) but the Bacularis UI doesn't seem to notice that the test is finished. The throbbers (the spilling circles) under the arrows continue to spin and no values are shown (for Packets, Duration, RTT etc.).

Bacula version: 9.6.7

Screenshot:

Bacularis Screenshot 2024-04-09 125647

Mobile LDAP Authentication

I've installed bacularis today, configured ldap sucessfully and I can login with my active directory login through web browser on pc.
The issue I'm facing is that I was trying bacularis on mobile web and I can't login with the same user.
I've noticed on apache2 access log this line below.
localhost:80 192.168.20.56 - - [19/Feb/2024:15:03:27 -0300] "GET /panel/config HTTP/1.1" 401 262 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/121.0.6167.171 Mobile/15E148 Safari/604.1"

Date fields are UTC even is php.ini has date.timezone configured

Hi. I'm runing bacula and bacularis on a debian bullseye and date fields are right in 1.0.12. The date.timezone in php.ini files are:

grep -r ^date.timezone|grep -v 'php.ini~'

7.4/cli/php.ini:date.timezone = America/Sao_Paulo
7.4/fpm/php.ini:date.timezone = America/Sao_Paulo
7.4/apache2/php.ini:date.timezone = America/Sao_Paulo

After upgrade do bacularis 1.1.0, the date fields are in UTC timezone. I tried to set the /etc/php7.4/fpm/pool.d/www.conf adding to the end fo file "php_admin_value[date.timezone] = America/Sao_Paulo" and restarted php7.4-fpm and apache2, but the date fields are wrong.

Am I missing something?

When updating by composer Web and API configuration is not preserved

After running in the Bacularis App project directory the update command:

composer update

existing Bacularis configuration files are lost.

Problem touches Bacularis installed by composer. Instances installed using binary packages are not touched by this problem.

To preserve configuration before updating there is needed to backup the following directories:

protected/vendor/bacularis/bacularis-api/API/Config
protected/vendor/bacularis/bacularis-web/Web/Config

If needed, log directories can be backed up as well:

protected/vendor/bacularis/bacularis-api/API/Logs
protected/vendor/bacularis/bacularis-web/Web/Logs

After updating, files can be restored to the original locations.

Dedicated Bconsole config file is not created

Hello Everybody,

The dedicated bconsole config file is not created on creating/updating Basic user account and OAuth2 account.

This problem is in Bacularis API and causes that on Bacularis Web on the Security page in tabs: API basic users and API OAuth2 clients the Create dedicated Bconsole config file does not cause creating Bconsole config file.

dedicated_bconsole_config_file

This bug has been introduced in Bacularis 3.2.0.

Best regards,
Marcin Haba (gani)

Deployment process incomplete

This issue should cover a few possible problems related to the deployment process.

Since they are closely interconnected, I will put them in one single issue.

The description will be quite a long, but I didn't manage to shorten it, and I think it is better to be more detailed, especially given that the main issue it really strange.

The main problem is that Bacularis is unable to create additional repository lists on a remote machine, despite the fact that it can access the remote machine.

The Bacularis version is latest 3.0.1 and both server and client are using Debian 12 Bookworm. The OS profile was created with appropriate Bookworm repository links and paths were corrected for deploy from bacula.org, along with package names.

These are the steps I used to reproduce the issue:

  1. create the key on system, by using ssh-keygen utility
  2. paste the private key content inside Deployment > SSH keys > Add new SSH key option
  3. Bacularis then create the key inside /etc/bacularis/Web/ directory
  4. Create new SSH config by using Deployment > SSH configs > Add new SSH config option, select the key previously created, username of remote user with sudo privileges and remote host
  5. Open Deploy API host option and select authentication method Use username and SSH key from SSH config for host, after entering necessary details about username, hostname, password, and check Use sudo box

After those steps, Bacularis shows that the first four steps are complete, although, they are not:
image

After logging in to the client machine, there are no additional repository files inside /etc/apt/sources.list.d/ where they should be, but surprisingly, the /tmp/bacularis-deploy/ folder is created, along with two files:

  1. bacularis-api with 2.7K bytes of text. It seems that these are some sudo settings for www-data user
  2. bacularis.pub.gpg with 1.3K byte GPG key

At the step 4 from the image, the deployment obviously fail, because there are no repository files added on client machine.

Looking at the Bacularis log from Raw output tab, everything seems to be normal (full log is in the attachment).

Along with the main issue described, there are three additional things that might need to be fixed or modified:

  1. If repository files are not created, Bacularis should detect that, and fail at the first step. It might be also beneficial for overall user experience if the deployment option would have "Connect to client" as a first step, where the connection will be tested first, before any other steps. This can be even added as separate option on Deployment page, and not just as one of deployment steps.
  2. When Use username and password auth method is selected, the ssh.conf file is still provided to the SSH command that Bacularis execute, which is probably not what user want, along with the Use username and SSH key from SSH config for host option that should be the only one to add ssh.conf to the command.
  3. The permissions and ownership on private keys added via Bacularis interface are not suitable for use by additional scripts that might use them, because the Bacularis set www-data user and group, and if the user, for an example, try to use that private key to be executed by some bash script defined inside RunScript block, the Job will fail, because it is executed as Bacula user, which is not able to access that file. For some users, adding bacula user to www-data group might solve the issue, but for me, the Jobs I configured in this manner would not work, until the permissions on file (the private key) were set to be www-data user and bacula group. Just to be clear, I am not saying that there is a problem here, because this might be very specific to the server environment; I am, however, saying that this should be at least mentioned in the troubleshooting section in documentation, because there are probably many users that would simply try to use one key as "backup server key" and try to use it for everything, just to find out that with the default settings the key can not be used by the Bacularis and the Bacula Jobs the same time.

The Highlight

To make sure the main issue is not buried in the already long description, I will point it out once again:

The main problem is that Bacularis obviously succeed in making connection and uploading two files to remote host with scp, but fail to create the repository lists.

Furthermore, by inspecting the executed commands and the client machine, I found out the following:

The Bacularis create a file /tmp/bacularis-deploy/bacularis.pub.gpg at client machine, but fail to move it to /usr/share/keyrings/bacularis-archive-keyring.gpg. The same thing is with bacularis-api.

I didn't manage to find out why simple mv command fail, but the state of the files is as described.

Also, by looking at the log, there is not anything related to the repositories like with the archive keyring and the bacularis-api file.


At this point, I have no idea why deployment process it not executing the important step and why the scp command succeed and simple mv fail.

The workaround for the problem is manually adding keys and repositories and let the deployment process complete installing and configuring Bacularis API host and bacula file daemon, but it certainly is not intended to be done this way, and the errors encountered might be the sign of possible flaws in deployment process, so I am certain it would be beneficial for the project to have this mentioned.

As a small side note, I have replaced the real domain from the log in attachment with "redacted.domain" string to be as a placeholder, but on its place was actually the real FQDN, it was just replaced in the log file after downloading.

bacularis-fail.txt

Add connection test to deployment page

Hello Everybody,

In issue #46 @sitemapxml proposed to add a connection test button (or deploy step with connection test) to test connection to remote hosts before starting the deployment process.

This issue is to keep this idea in the separate feature request.

Best regards,
Marcin Haba (gani)

Lost admin password

Hello,

I have lost the password to access bacularis app (not HTTP auth, I think on this login screen).
Although this seems as a basic question, I didn't manage to find an answer in the docs.
How can I reset the admin password?

Ability to add filter for LDAP auth

Hello,
First of all, thank you for this
It would be great to be able to set an LDAP filter for user authentication, for example :

(&(objectClass=inetOrgPerson)(memberOf=cn=bacularis,cn=groups,cn=accounts,dc=domain,dc=en)(!(nsaccountlock=TRUE)))

Ideally, we could have several filters to assign different roles depending on the ldap group, for example

Thanks a lot!

New job wizards do not create job config

Hello Everybody,

In Bacularis 3.2.0 the following wizards are not working correctly. In the last step they don't save job configuration and report Config does not exist error:

  • New backup job wizard
  • New copy job wizard
  • New migrate job wizard
  • New verify job wizard
  • New virtual full job wizard
  • New user wizard

Best regards,
Marcin Haba (gani)

Bacularis APP 2.0 - dark theme small error

Hello Marcin,
First of all, thank you for your work.
I use bacularis app version 2.2.0 as a docker container. When I activate the dark theme, I have a white background in one place like in the picture.
Bacularis_APP_2 2 0_error

After login go to: Volumes => click on button "Quick edit"

Best regards
Johann

Set access button does not write config

Hello Everybody,

In Bacularis 3.2.0 the set access button on the Security page does not work correctly. It does not save limitted job resource access.

Best regards,
Marcin Haba (gani)

missing style / empty pages / invalid director

Hi

After installing bacularis 2.6.0 the first visit to the website properly brings up authentication and after logging in,
the install wizard shows up but without any styling on the page.

Screenshot 2024-03-12 at 11-20-07 Bacularis - Bacula Web Interface

After some testing adding a simple echo("@"); to the begining of index.php makes it load the actual styles and the installation
can be finished with all tests returning OK, however after logging in all the pages are empty or returning an invalid director
error.

Screenshot 2024-03-12 at 11-21-55 Bacularis - Bacula Web Interface

Going to the API panel, none of the endpoints return anything, even though all the replies are 200 according to the log.

XXX.XXX.XXX.XXX - admin [12/Mar/2024:11:25:39 +0100] "GET /api/v2/jobs?limit=10 HTTP/1.1" 200 8154 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"

At this point removing the echo from index.php, the API replies can be seen, but there are no styling on the page
at all. So at this point I think the empty pages are caused by the additional echo, so the missing styling is the actual issue.

Screenshot 2024-03-12 at 11-28-34 Bacularis - Bacula Web Interface

`
XXX.XXX.XXX.XXX - admin [12/Mar/2024:11:30:20 +0100] "GET /panel/ HTTP/1.1" 200 15828 "http://REDACTED:9097/web/director//" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/f2770455/baculum.css?ver=2.6.0 HTTP/1.1" 200 20095 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/4502e5b/prado.js HTTP/1.1" 200 32175 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/4502e5b/activecontrols/ajax3.js HTTP/1.1" 200 28032 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/4502e5b/controls/controls.js HTTP/1.1" 200 13974 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/4cd33fa/themes/base/jquery-ui.css HTTP/1.1" 200 35973 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/4502e5b/activecontrols/activecontrols3.js HTTP/1.1" 200 10383 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/d6a2e0af/dataTables.responsive.min.js?ver=2.6.0 HTTP/1.1" 200 14597 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/bb4d50d7/dataTables.buttons.min.js?ver=2.6.0 HTTP/1.1" 200 25485 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/bb4d50d7/buttons.html5.min.js?ver=2.6.0 HTTP/1.1" 200 25138 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/bb4d50d7/buttons.colVis.min.js?ver=2.6.0 HTTP/1.1" 200 3267 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/4227f0a9/dataTables.select.min.js?ver=2.6.0 HTTP/1.1" 200 14277 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/552c6492/misc.js?ver=2.6.0 HTTP/1.1" 200 11401 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/8a3c9400/jquery.dataTables.min.js?ver=2.6.0 HTTP/1.1" 200 87110 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/aa252275/w3.css?ver=2.6.0 HTTP/1.1" 200 23427 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/1ca2589a/jquery.dataTables.min.css?ver=2.6.0 HTTP/1.1" 200 13624 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/d74d2b0e/responsive.dataTables.min.css?ver=2.6.0 HTTP/1.1" 200 4238 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/567dafab/buttons.dataTables.min.css?ver=2.6.0 HTTP/1.1" 200 13204 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /themes/Baculum-v2/fonts/css/fontawesome-all.min.css?ver=2.6.0 HTTP/1.1" 200 102641 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/26681442/avatar2.png HTTP/1.1" 200 8490 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/26681442/logo.png HTTP/1.1" 200 3038 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:20 +0100] "GET /assets/cf3d3576/jquery.js HTTP/1.1" 200 292458 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:21 +0100] "GET /assets/4cd33fa/jquery-ui.js HTTP/1.1" 200 520714 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - - [12/Mar/2024:11:30:21 +0100] "GET /assets/26681442/favicon.ico HTTP/1.1" 200 4286 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"
XXX.XXX.XXX.XXX - admin [12/Mar/2024:11:30:21 +0100] "POST /panel/ HTTP/1.1" 200 1862 "http://REDACTED:9097/panel/" "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"

`
The system is running nginx with the default included configuration of bacularis with php 8.2.

PHP error if apostrophe character is used in view name

Hello Everybody,

Joachim Legrand reported me that Bacularis throws PHP error if in data view name is used apostrophe character. It causes breaking all pages with data views.

I confirmed this wrong behavior in my local environment too.

Best regards,
Marcin Haba (gani)

Add sorting capability to size column in backup file list

Hello Everybody,

This feature request reported me Ken Mandelberg.

Ken would like to be able to sort by size the file list on the job view page in the Job files tab. This function will help to find for example the biggest files in backup.

bacularis-sorting-by-size

Best regards,
Marcin Haba (gani)

Job - Run script on Client not working

Hi, when i edit a job and flag "RunsOnClient" in the Runscript Section, in the bacula-dir.conf the corresponding entry is not written.
This is the slice of script written by Bacularis:

Runscript {
RunsOnSuccess = no
FailJobOnError = no
RunsWhen = "Before"
Command = "/usr/sbin/bkdbsingoli"
}

Obviously the script on client don't start and the backup is empty.

If I manually modify the bacula-dir.conf with the following entry the script start.

Runscript {
RunsOnClient = Yes
RunsWhen = "Before"
Command = "/usr/sbin/bkdbsingoli"
}

This is a little bug, but every modify done by web interface delete the "RunsOnClient" entry I made.
I Installed 1.6.0 version of Bacularis

flag
jobflag
jobok

Reopen: Volume list & volume detail: incorrect display of date in "last written" column

Hello Marcin,

I'm afraid I have to reopen issue #5.

The version 1.4.0 was installed today, but the problem partially remains:

  1. the Volumes list (table view) is still incorrect - see bottom part of the image
  2. The volume detail view now shows the "Last Written" correctly as "0000-00-00 00:00:00"
  3. The "When expire" in the volume detail view still doesn't make sense (it shows "0001-11-29 00:00:00").

bacularis-bug-2

Could you please take another look at this issue?

Many thanks
Niels (nisori)

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.