Skip to content

Commit

Permalink
I’ll come back :)
Browse files Browse the repository at this point in the history
dirty draft there
  • Loading branch information
tim4dev committed Sep 30, 2014
1 parent 544ce5e commit 15aa855
Show file tree
Hide file tree
Showing 39 changed files with 310 additions and 1,712 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Webacula - Web Bacula - web interface of a Bacula backup system http://www.bacula.org/

Version: 5.5.2
Version: 7.0.0

http://webacula.sourceforge.net/
http://github.com/tim4dev/webacula
Expand Down
16 changes: 8 additions & 8 deletions application/config.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
;
; config.ini
; Webacula 5.5
; Webacula 7.0.0
;

[general]
;; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = root
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = bacula
db.config.password =
db.config.dbname = bacula
db.config.dbname = bacula
;; for Sqlite db.config.dbname = "/full patch/bacula.db"

;; see http://www.php.net/timezones
Expand All @@ -21,9 +21,9 @@ def.timezone = "Europe/Minsk"
; locale = "en"

;; see INSTALL file for details
bacula.sudo = "/usr/bin/sudo"
bacula.bconsole = "/sbin/bconsole"
bacula.bconsolecmd = "-n -c /etc/bacula/bconsole.conf"
bacula.sudo = "/usr/bin/sudo"
bacula.bconsole = "/opt/bacula/sbin/bconsole"
bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf"

;; time to live data (session and temporary data tables) for restore files (sec)
; default = 1h
Expand Down
16 changes: 8 additions & 8 deletions application/config.ini.original
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
;
; config.ini
; Webacula 5.5
; Webacula 7.0.0
;

[general]
;; supported adapters : PDO_MYSQL, PDO_PGSQL, PDO_SQLITE
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = root
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = bacula
db.config.password =
db.config.dbname = bacula
db.config.dbname = bacula
;; for Sqlite db.config.dbname = "/full patch/bacula.db"

;; see http://www.php.net/timezones
Expand All @@ -21,9 +21,9 @@ def.timezone = "Europe/Minsk"
; locale = "en"

;; see INSTALL file for details
bacula.sudo = "/usr/bin/sudo"
bacula.bconsole = "/sbin/bconsole"
bacula.bconsolecmd = "-n -c /etc/bacula/bconsole.conf"
bacula.sudo = "/usr/bin/sudo"
bacula.bconsole = "/opt/bacula/sbin/bconsole"
bacula.bconsolecmd = "-n -c /opt/bacula/etc/bconsole.conf"

;; time to live data (session and temporary data tables) for restore files (sec)
; default = 1h
Expand Down
24 changes: 12 additions & 12 deletions docs/src/install.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

\hypersetup
{
pdfauthor={Yuri Timofeev tim4dev@gmail.com},
pdfauthor={Yuriy Timofeev tim4dev@gmail.com},
pdftitle={Webacula v.5.5. Installation Manual},
pdfkeywords={webacula, manual, install, bacula}
}
Expand All @@ -34,8 +34,8 @@
}
\author{
\begin{small}
Copyright 2007, 2008, 2009, 2010, 2011, 2012
Yuri Timofeev \htmladdnormallink{tim4dev@gmail.com}{mailto:tim4dev@gmail.com}
Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2014
Yuriy Timofeev \htmladdnormallink{tim4dev@gmail.com}{mailto:tim4dev@gmail.com}
\end{small}
}
%\date{Jan 2011}
Expand Down Expand Up @@ -178,7 +178,7 @@ \subsection{Setting up to run bconsole under Webacula}
Add apache to group: \\
\texttt{usermod -aG bacula apache}

\textbf{IMPORTANT}. Check \texttt{/usr/sbin/bconsole} it should be the binary ELF file, not a shell script!
\textbf{IMPORTANT}. Check \texttt{/opt/bacula/sbin/bconsole} it should be the binary ELF file, not a shell script!

Next, setup \texttt{bconsole} can be executed under Apache webserver.

Expand All @@ -188,17 +188,17 @@ \subsubsection{Without using sudo}
\label{Install:Setting up to run bconsole from under Webacula:without sudo}

\begin{verbatim}
chown root:bacula /usr/sbin/bconsole
chmod u=rwx,g=rx,o= /usr/sbin/bconsole
chown root:bacula /opt/bacula/sbin/bconsole
chmod u=rwx,g=rx,o= /opt/bacula/sbin/bconsole
chown root:bacula /etc/bacula/bconsole.conf
chmod u=rw,g=r,o= /etc/bacula/bconsole.conf
chown root:bacula /opt/bacula/etc/bconsole.conf
chmod u=rw,g=r,o= /opt/bacula/etc/bconsole.conf
\end{verbatim}

Edit \texttt{application/config.ini}
\begin{verbatim}
bacula.sudo = ""
bacula.bconsole = "/usr/sbin/bconsole"
bacula.bconsole = "/opt/bacula/sbin/bconsole"
\end{verbatim}


Expand All @@ -209,19 +209,19 @@ \subsubsection{With sudo}
Edit \texttt{application/config.ini}
\begin{verbatim}
bacula.sudo = "/usr/bin/sudo"
bacula.bconsole = "/usr/sbin/bconsole"
bacula.bconsole = "/opt/bacula/sbin/bconsole"
\end{verbatim}

Run \texttt{visudo} and changes
\begin{verbatim}
# (!!! comment here !!!) Defaults requiretty
apache ALL=NOPASSWD: /usr/sbin/bconsole
apache ALL=NOPASSWD: /opt/bacula/sbin/bconsole
\end{verbatim}

Check out the run bconsole :
\begin{verbatim}
# su -l apache -s /bin/sh \
-c "/usr/bin/sudo /usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf"
-c "/usr/bin/sudo /opt/bacula/sbin/bconsole -n -c /opt/bacula/etc/bconsole.conf"
\end{verbatim}


Expand Down
4 changes: 2 additions & 2 deletions html/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*
*/

define('WEBACULA_VERSION', '5.5.2' . ', build 2011.11.01');
define('BACULA_VERSION', 12); // Bacula Catalog version
define('WEBACULA_VERSION', '7.0.0' . ', build 2014.10.30');
define('BACULA_VERSION', 14); // Bacula Catalog version

define('ROOT_DIR', dirname(dirname(__FILE__)) );
define('CACHE_DIR', ROOT_DIR.'/data/cache' );
Expand Down
13 changes: 8 additions & 5 deletions install/MySql/20_acl_make_tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS webacula_roles (
description TEXT,
inherit_id integer,
primary key (id)
);
);
CREATE TABLE IF NOT EXISTS webacula_resources (
Expand Down Expand Up @@ -167,12 +167,15 @@ INSERT INTO webacula_dt_commands (id, name, description) VALUES
(270, 'reload', 'Reload conf file'),
(280, 'run', 'Run a job'),
(290, 'status', 'Report status'),
(295, 'stop', 'Stop a job'),
(300, 'setdebug', 'Sets debug level'),
(305, 'setbandwidth','Sets bandwidth'),
(310, 'setip', 'Sets new client address, if authorized'),
(320, 'show', 'Show resource records'),
(330, 'sqlquery', 'Use SQL to query catalog'),
(340, 'time', 'Print current time'),
(350, 'trace', 'Turn on/off trace to file'),
(355, 'truncate', 'Truncate one or more Volumes'),
(360, 'unmount', 'Unmount storage'),
(370, 'umount', 'Umount - for old-time Unix guys, see unmount'),
(380, 'update', 'Update volume, pool or stats'),
Expand Down Expand Up @@ -238,13 +241,13 @@ CREATE TABLE IF NOT EXISTS webacula_where_acl (
role_id integer,
PRIMARY KEY (id),
INDEX (id, order_acl),
UNIQUE INDEX (name(256), role_id)
UNIQUE INDEX (name(254), role_id)
);
-- 'root_role' Bacula ACLs
INSERT INTO webacula_storage_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
INSERT INTO webacula_storage_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
INSERT INTO webacula_pool_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
INSERT INTO webacula_client_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
INSERT INTO webacula_fileset_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
Expand All @@ -263,8 +266,8 @@ INSERT INTO webacula_job_acl (name, order_acl, role_id) VALUES ('*all*', 1,
-- PHP session storage
CREATE TABLE webacula_php_session (
id char(32),
CREATE TABLE IF NOT EXISTS webacula_php_session (
id char(64),
modified integer,
lifetime integer,
data_session TEXT,
Expand Down
6 changes: 4 additions & 2 deletions install/PostgreSql/20_acl_make_tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,15 @@ INSERT INTO webacula_dt_commands (id, name, description) VALUES
(270, 'reload', 'Reload conf file'),
(280, 'run', 'Run a job'),
(290, 'status', 'Report status'),
(295, 'stop', 'Stop a job'),
(300, 'setdebug', 'Sets debug level'),
(305, 'setbandwidth','Sets bandwidth'),
(310, 'setip', 'Sets new client address, if authorized'),
(320, 'show', 'Show resource records'),
(330, 'sqlquery', 'Use SQL to query catalog'),
(340, 'time', 'Print current time'),
(350, 'trace', 'Turn on/off trace to file'),
(355, 'truncate', 'Truncate one or more Volumes'),
(360, 'unmount', 'Unmount storage'),
(370, 'umount', 'Umount - for old-time Unix guys, see unmount'),
(380, 'update', 'Update volume, pool or stats'),
Expand All @@ -181,7 +184,6 @@ INSERT INTO webacula_dt_commands (id, name, description) VALUES
(420, 'wait', 'Wait until no jobs are running');
CREATE TABLE webacula_fileset_acl (
id SERIAL NOT NULL,
name varchar(127),
Expand Down Expand Up @@ -263,7 +265,7 @@ INSERT INTO webacula_job_acl (name, order_acl, role_id) VALUES ('*all*', 1,
-- PHP session storage
CREATE TABLE webacula_php_session (
id char(32),
id char(64),
modified integer,
lifetime integer,
data_session TEXT,
Expand Down
9 changes: 6 additions & 3 deletions install/SqLite/20_acl_make_tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CREATE TABLE webacula_roles (
description TEXT,
inherit_id integer,
primary key (id)
);
);
CREATE TABLE webacula_resources (
Expand Down Expand Up @@ -165,12 +165,15 @@ INSERT INTO webacula_dt_commands (id, name, description) VALUES (260, 'release',
INSERT INTO webacula_dt_commands (id, name, description) VALUES (270, 'reload', 'Reload conf file');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (280, 'run', 'Run a job');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (290, 'status', 'Report status');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (295, 'stop', 'Stop a job');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (300, 'setdebug', 'Sets debug level');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (305, 'setbandwidth','Sets bandwidth');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (310, 'setip', 'Sets new client address, if authorized');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (320, 'show', 'Show resource records');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (330, 'sqlquery', 'Use SQL to query catalog');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (340, 'time', 'Print current time');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (350, 'trace', 'Turn on/off trace to file');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (355, 'truncate', 'Truncate one or more Volumes');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (360, 'unmount', 'Unmount storage');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (370, 'umount', 'Umount - for old-time Unix guys, see unmount');
INSERT INTO webacula_dt_commands (id, name, description) VALUES (380, 'update', 'Update volume, pool or stats');
Expand Down Expand Up @@ -242,7 +245,7 @@ CREATE INDEX webacula_where_acl_idx2 ON webacula_where_acl(id, order_acl)
-- 'root_role' Bacula ACLs
INSERT INTO webacula_storage_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
INSERT INTO webacula_storage_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
INSERT INTO webacula_pool_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
INSERT INTO webacula_client_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
INSERT INTO webacula_fileset_acl (name, order_acl, role_id) VALUES ('*all*', 1, 1);
Expand All @@ -262,7 +265,7 @@ INSERT INTO webacula_job_acl (name, order_acl, role_id) VALUES ('*all*', 1,
-- PHP session storage
CREATE TABLE webacula_php_session (
id char(32),
id char(64),
modified integer,
lifetime integer,
data_session TEXT,
Expand Down
7 changes: 3 additions & 4 deletions install/db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
db_name="bacula"
# for Sqlite only
db_name_sqlite="/var/bacula/working/bacula.db"
db_user="root"
db_user="bacula"

# CHANGE_THIS
# !!! CHANGE_THIS !!!
db_pwd=""

# Webacula web interface settings
#
# Built-in superuser login is 'root'
#
# CHANGE_THIS
# !!! CHANGE_THIS !!!
webacula_root_pwd=""

2 changes: 1 addition & 1 deletion packaging/Fedora/webacula.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: webacula
Version: 5.5.2
Version: 7.0.0
Release: 1%{?dist}
Summary: Web interface of a Bacula backup system
Summary(ru): Веб интерфейс для Bacula backup system
Expand Down
34 changes: 34 additions & 0 deletions tests/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@


Zend Framework 1 applications currently, and possibly for quite some time, only function properly using PHPUnit 3.5.x.
Please see downgrade phpunit 3.6 to 3.5.15 on how to downgrade to 3.5.
Zend Framework 2 will support the current version of PHPUnit again.

pear config-set http_proxy http://username:password@yourproxy:80

phpunit --version

pear uninstall phpunit/PHPUnit_Selenium
pear uninstall phpunit/PHPUnit
pear uninstall phpunit/DbUnit
pear uninstall phpunit/PHP_CodeCoverage
pear uninstall phpunit/File_Iterator
pear uninstall phpunit/PHP_Timer
pear uninstall phpunit/PHPUnit_MockObject
pear uninstall phpunit/Text_Template
pear uninstall phpunit/PHPUnit_Selenium
pear uninstall pear.symfony-project.com/YAML
pear uninstall phpunit/PHP_TokenStream

pear install --alldeps pear.symfony-project.com/YAML-1.0.2
pear install --alldeps phpunit/PHPUnit_Selenium-1.0.1
pear install --alldeps phpunit/Text_Template-1.0.0
pear install --alldeps phpunit/PHPUnit_MockObject-1.0.3
pear install --alldeps phpunit/PHP_Timer-1.0.0
pear install --alldeps phpunit/File_Iterator-1.2.3
pear install --alldeps phpunit/PHP_TokenStream-1.0.1
pear install --alldeps phpunit/PHP_CodeCoverage-1.0.2
pear install --alldeps phpunit/DbUnit-1.0.0
pear install --alldeps phpunit/PHPUnit-3.5.15


2 changes: 1 addition & 1 deletion tests/application/ModelTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected function _rootLogin() {
'role_id' => 1,
'role_name' => 'root_role'
);
// wtite session
// write session
$auth = Zend_Auth::getInstance();
$storage = $auth->getStorage();
$storage->write($data);
Expand Down
4 changes: 2 additions & 2 deletions tests/application/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
/*
* from index.php
*/
define('WEBACULA_VERSION', '5.5.x, build for tests');
define('BACULA_VERSION', 12); // Bacula Catalog version
define('WEBACULA_VERSION', '7.x, build for tests');
define('BACULA_VERSION', 14); // Bacula Catalog version
define('ROOT_DIR', $appRoot );
define('CACHE_DIR', ROOT_DIR.'/data/cache' );

Expand Down
Loading

0 comments on commit 15aa855

Please sign in to comment.