oliveiraped / Reportula

Reportula is a php based web program that provides you a summarized output stats of Bacula Backups jobs, clients, volumes and director that have already run. It obtains its information from your catalog database. This is a fairly high level bacula management tool. Here are a few points that one user made concerning this important tool. It is web-based so can be accessed from anywhere. It packs a phenomenal amount of information into a single web-page – that I credit as being very good design! Features Display last jobs status Display volumes usage by pool Full supported MySQL, PostgreSQL databases. Show Jobs which executed with errors last day, week, month Show a condition of your Volumes Show terminated Jobs Search Jobs on several conditions The detailed information on Pools, Volumes, Storages and Clients Search options List the files stored on job Acl Supports and Login users support Integration with Active Directory or Ldap servers
http://www.reportula.org
GNU General Public License v3.0
25 stars 9 forks source link

Configurator Issue and Permissions #14

Open newburns opened 10 years ago

newburns commented 10 years ago

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 commented 10 years ago

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]

oliveiraped commented 10 years ago

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