Skip to content

Commit

Permalink
webui: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Nov 23, 2015
1 parent ee2297b commit 174b1a6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 92 deletions.
13 changes: 13 additions & 0 deletions manuals/en/main/bareos-manual-main-reference.tex
Expand Up @@ -131,6 +131,19 @@ \chapter{Installing Bareos}
\index[general]{Installing Bareos}

\input{install} % install

\chapter{Installing Bareos Webui}
\label{sec:webui}
\label{sec:install-webui}
\index[general]{Webui}
\index[general]{Webui!Install}

\input{webui}

\chapter{Updating Bareos}
\label{bareos-update}

\input{update}


\chapter{Getting Started with Bareos}
Expand Down
84 changes: 0 additions & 84 deletions manuals/en/main/install.tex
Expand Up @@ -325,87 +325,3 @@ \section{Start the daemons}
Now you should be able to access the director using the bconsole.
When you want to use the bareos-webui, please refer to the chapter \nameref{sec:install-webui}.
\include{webui}
\chapter{Updating Bareos}
\label{bareos-update}
In most cases, a Bareos update is simply done by a package update of the distribution.
Please remind, that Bareos Director and Bareos Storage Daemon must always have the same version.
The version of the File Daemon may differ, see chapter about \ilink{backward compatibility}{backward-compability}.
\section{Updating the database scheme}
Sometimes improvements in Bareos make it neccessary to update the database scheme.
\warning{If the Bareos catalog database does not have the current schema, the Bareos Director refuses to start.}
Detailed information can then be found in the log file \logfileUnix.
Take a look into the \ilink{Release Notes}{releasenotes} to see which Bareos updates do require a database scheme update.
\subsection{Debian based Linux Distributions}
Since Bareos \sinceVersion{dir}{dbconfig-common (Debian)}{14.2.0} the Debian (and Ubuntu) based packages support the \package{dbconfig-common} mechanism to create and update the Bareos database.
If this is properly configured, the database schema will be automatically adapted by the Bareos packages.
\warning{When using the PostgreSQL backend and updating to Bareos $<$ 14.2.3, it is necessary to manually grant database permissions, normally by using}
\begin{commands}{}
<command> </command><parameter>su - postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges</parameter>
\end{commands}
For details see \nameref{sec:dbconfig}.
If you disabled the usage of \package{dbconfig-common},
follow the instructions for \nameref{sec:UpdateDatabaseOtherDistributions}.
\subsection{Other Platforms}
\label{sec:UpdateDatabaseOtherDistributions}
This has to be done as database administrator.
On most platforms Bareos knows only about the credentials to access the Bareos database,
but not about the database administrator to modify the database schema.
The task of updating the database schema is done by the script
\command{/usr/lib/bareos/scripts/update_bareos_tables}.
However, this script requires administration access to the database.
Depending on your distribution and your database, this requires different preparations.
More details can be found in chapter \ilink{Catalog Maintenance}{CatMaintenanceChapter}.
\warning{If you're updating to Bareos $<=$ 13.2.3 and have configured the Bareos database during install using Bareos environment variables (\variable{db_name}, \variable{db_user} or \variable{db_password}, see \nameref{CatMaintenanceChapter}), make sure to have these variables defined in the same way when calling the update and grant scripts. Newer versions of Bareos read these variables from the Director configuration file \configFileDirUnix. However, make sure that the user running the database scripts has read access to this file (or set the environment variables). The \user{postgres} user normally does not have the required permissions.}
\subsubsection{PostgreSQL}
If your are using PostgreSQL and your PostgreSQL administrator is \user{postgres} (default), use following commands:
\begin{commands}{Update PostgreSQL database schema}
su postgres -c /usr/lib/bareos/scripts/update_bareos_tables
su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
\end{commands}
The \command{grant_bareos_privileges} command is required, if new databases tables are introduced. It does not hurt to run it multiple times.
After this, restart the Bareos Director and verify it starts without problems.
\subsubsection{MySQL/MariaDB}
Make sure, that \user{root} has direct access to the local MySQL server.
Check if the command \command{mysql} without parameter connects to the database.
If not, you may be required to adapt your local MySQL config file \file{~/.my.cnf}.
It should look similar to this:
\begin{config}{MySQL credentials file .my.cnf}
[client]
host=localhost
user=root
password=<input>YourPasswordForAccessingMysqlAsRoot</input>
\end{config}
If you are able to connect via the \command{mysql} to the database, run the following script from the Unix prompt:
\begin{commands}{Update MySQL database schema}
/usr/lib/bareos/scripts/update_bareos_tables
\end{commands}
Currently on MySQL is it not neccessary to run \command{grant_bareos_privileges}, because access to the database is already given using wildcards.
After this, restart the Bareos Director and verify it starts without problems.
2 changes: 1 addition & 1 deletion manuals/en/main/programs.tex
Expand Up @@ -207,7 +207,7 @@ \subsection{bareos-webui}
\index[general]{Command!bareos-webui}
\label{bareos-webui}

For further information regarding the Bareos Webui, please refer to the chapter \nameref{}.
For further information regarding the Bareos Webui, please refer to the chapter \nameref{sec:webui}.

\section{Volume Utility Commands}
\index[general]{Volume Utility Tools}
Expand Down
7 changes: 0 additions & 7 deletions manuals/en/main/webui.tex
@@ -1,13 +1,6 @@
%%
%%

\chapter{Installing Bareos Webui}
\label{sec:webui}
\label{sec:install-webui}
\index[general]{Webui}
\index[general]{Webui!Install}
\index[general]{bareos-webui}

This chapter addresses the installation process of the Bareos Webui.

Since \sinceVersion{dir}{bareos-webui}{15.2.0} bareos-webui is part of the Bareos project and available for a number of platforms.
Expand Down

0 comments on commit 174b1a6

Please sign in to comment.