Reportula icon indicating copy to clipboard operation
Reportula copied to clipboard

Configurator Issue and Permissions

Open newburns opened this issue 10 years ago • 2 comments

The installation instructions were very vague, so (for now) the complete bacula and reportula directory are writable by the Apache Group. Will change once I understand what permissions are needed. I am on Centos 6.5 and PHP 5.5 from webstatic

PHP 5.5.18 (cli) (built: Oct 16 2014 20:56:12) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

I basically unzipped the master, change ownership permissions and installed. I'm assuming it installed DB into the Bacula DB, so I'm hoping it doesn't corrupt anything for production Bacula.

I get this error doing the Test Configuration for the configurator: [20:06:45] LOG.error: exception 'ErrorException' with message 'mkdir(): Permission denied' in /var/www/report/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:297

Again, I'm not sure what permissions need changing, but the complete Reportula directory is writable by the www group and the bacula user.

When trying to do a Read Configuration, I get this error: [20:11:02] LOG.error: exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column '#MaximumVolumeBytes' in 'field list'' in /var/www/report/vendor/laravel/framework/src/Illuminate/Database/Connection.php:369

Console seems to work just fine. Reports from front side seem to work just fine.

I have all of my clients, jobs, etc. setup in separate .conf files. The only thing established in the Director conf are the Schedules.

Let me know if you want the complete stack trace to help debug this.

newburns avatar Nov 07 '14 20:11 newburns

I think I see what's going on... Reportula does not read configurations outside of the /etc/bacula/bacula-dir.conf file. I can see all of the default jobs, filesets, etc. But I don't any of my custom conf's except for my Schedules (which are created within the bacula-dir.conf) Just a note: My conf's are append to the bottom of the bacula-dir using [CODE] @/etc/bacula/conf.d/sample.conf [/CODE]

newburns avatar Nov 07 '14 20:11 newburns

Hi NewBurns the configurator is in developing. It meets all 90 % of the bacula configuration options, but has some issues.

  1. Its better no to have comments on the configuration files like this

    a.FileSet { # This is Files set b. or like this # comment FileSet {

    1. You can not have white space between options

Filesset { .... ...... } [whitespace] Job { ....... ...... }

  1. Reportula must be able to read and write bacula configuration directory - you have to add apache user to bacula group
  2. Reportula uses Bacula Database, it adds some new tables to the database, but does not change bacula main database tables, only read information from it. For the Configuration Tables for Reportula it has the prefix name with "cfg....." .
  3. Reportula change Bacula configuration files on the filesystem when you write the configuration. It will do schema like this :

/etc/bacula/conf.d/ # has Pools.conf, schedule.conf, storage.conf, catalog.conf. /etc/bacula/conf.d/clients/ # Clients Files /etc/bacula/conf.d/filesets/ # Filesset Files /etc/bacula/conf.d/obs/ # Jobs Files

But this only happens if you choose to write configuration.

  1. In developing the methodology for the configurator is like this :

    a: Reportula reads configuration

    B : when select "test configuration", Reportula will recreate the directory schema above inside /etc/bacula/reportulatest/ and will execute "bacula -t /etc/bacula/reportulatest/bacula-dir.conf" and will return the error to see if the configuration is okay

    C: if the configuration is okay then, When choose "write configuration", Reportula will copy the configuration from "/etc/bacula/reportulatest/" to "/etc/bacula/conf.d/"

E: in the Future it will be able to do "bconsole | reload" to reload the configuration.

Now about your questions ::

  1. "ion 'ErrorException' with message 'mkdir(): Permission denied' in "

    Problaby you dont have permission to write the directory schema inside /etc/bacula

  2. It Reads in my Bacula-dir i put this in the end of File

    ###################### CATALOGS DEFINITION FILES ###############################################

    @/etc/bacula//conf.d/catalog.conf

    ###################### MESSAGES DEFINITION FILES ###############################################

    @/etc/bacula/conf.d/messages.conf

    ###################### CLIENTS DEFAULTS DEFINITION FILES ###############################################

    @|"sh -c 'for f in /etc/bacula//conf.d/clients/*.conf ; do echo @${f} ; done'"
    
    ###################### FILESETS DEFAULTS DEFINITION FILES ###############################################
    
    @|"sh -c 'for f in /etc/bacula//conf.d/filesets/*.conf ; do echo @${f} ; done'"
    
    ###################### JOBS DEFAULTS DEFINITION FILES ###############################################
    
    @|"sh -c 'for f in /etc/bacula//conf.d/jobs/*.conf ; do echo @${f} ; done'"
    

But has i sad the configurator is in i very early stage, but its i good start, please read my code test it and try to improve it.

On the next couple week i Will Try to Make better Documentation for Reportula.

Best Regards

oliveiraped avatar Nov 08 '14 19:11 oliveiraped