Welcome to mirror list, hosted at ThFree Co, Russian Federation.

webui.tex « main « en « manuals - github.com/bareos/bareos-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a235d0cbbe890aaf21ea0684f9af2a041ff823cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
%%
%%

This chapter addresses the installation process of the \bareosWebui.

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

\begin{center}
  \includegraphics[width=0.8\textwidth]{\idir bareos-webui-jobs}
\end{center}

\section{Features}

\begin{itemize}
\item Intuitive web interface
\item Multilinugual (English/German/French/Russian)
\item Can access multiple directors and catalogs
\item Individual accounts and ACL support via Bareos restricted named consoles
%\item Display of the most recent job status in a dashboard widget
%\item Display of current director messages in a dashboard widget
\item Tape Autochanger management, with the possibility to label, import/export media and update your autochanger slot status
\item Temporarly enable or disable jobs, clients and schedules and also see their current state
\item Show
    \begin{itemize}
    \item Detailed information about Jobs, Clients, Filesets, Pools, Volumes, Storages, Schedules, Logs and Director messages
    \item Filedaemon, Storage- and Director updates
    \item Client, Director, Storage and Scheduler status
    \end{itemize}
%\item Browse through your pools and media/volumes to keep track of retentions, volume status and usage
\item Backup Jobs
    \begin{itemize}
    \item Start, cancel, rerun and restore from.
    \item Show the file list of backup jobs
    \end{itemize}
\item Restore files by browsing through a filetree of your backup jobs.
    \begin{itemize}
    \item Merge your backup jobs history and filesets of a client or use a single backup job for restore.
    \item Restore files to a different client instead of the origin
    \end{itemize}
\item bconsole interface (limited to non-interactive commands)
\end{itemize}

\section{System Requirements}

\begin{itemize}
\item A platform, for which the \package{bareos-webui} package is available, see \nameref{sec:BareosPackages}.
\item A working Bareos environment.
\item \bareosDir version $>=$ \bareosWebui version.
\item The \bareosWebui can be installed on any host. It does not have to be installed on the same as the \bareosDir.
\item The default installation uses an Apache 2.x webserver with mod-rewrite, mod-php5 and mod-setenv.
\item PHP $>$= 5.3.23
\item On SUSE Linux Enterprise 12 you need the additional SUSE Linux Enterprise Module for Web Scripting 12.
\end{itemize}

\subsection{Version $<$ 16.2}

\bareosWebui \sinceVersion{}{bareos-webui incorporates Zend Framework 2}{16.2.4} incorporates the required Zend Framework 2 components, no extra Zend Framework installation is required.
For older versions of \package{bareos-webui}, you must install Zend Framework separately.
Unfortunately, not all distributions offer Zend Framework 2 packages.
The following list shows where to get the Zend Framework 2 package:

\begin{itemize}
  \item RHEL, CentOS
    \begin{itemize}
    \item \url{https://fedoraproject.org/wiki/EPEL}
    \item \url{https://apps.fedoraproject.org/packages/php-ZendFramework2}
    \end{itemize}

  \item Fedora
    \begin{itemize}
    \item \url{https://apps.fedoraproject.org/packages/php-ZendFramework2}
    \end{itemize}

  \item SUSE, Debian, Ubuntu
    \begin{itemize}
    \item \url{http://download.bareos.org/bareos}
    \end{itemize}
\end{itemize}

Also be aware, that older versions of \bareosDir do not support the \nameref{sec:SubdirectoryConfigurationScheme}
and therefore Bareos configuration resource files must be included manually.

\section{Installation}

\subsection{Adding the Bareos Repository}

If not already done, add the Bareos repository that is matching your Linux distribution. Please have a look at the chapter \nameref{sec:InstallBareosPackages} for more information on how to achieve this.

\subsection{Install the bareos-webui package}

After adding the repository simply install the bareos-webui package via your package manager.

\begin{itemize}
 \item RHEL, CentOS and Fedora
\begin{commands}{}
yum install bareos-webui
\end{commands}
 or
\begin{commands}{}
dnf install bareos-webui
\end{commands}
\end{itemize}

\begin{itemize}
 \item SUSE Linux Enterprise Server (SLES), openSUSE
\begin{commands}{}
zypper install bareos-webui
\end{commands}
\end{itemize}

\begin{itemize}
 \item Debian, Ubuntu
\begin{commands}{}
apt-get install bareos-webui
\end{commands}
\end{itemize}

\subsection{Minimal Configuration}

This assumes, \bareosDir and \bareosWebui are installed on the same host.

\begin{enumerate}

\item If you are using SELinux, allow HTTPD scripts and modules make network connections:
\begin{commands}{}
setsebool -P httpd_can_network_connect on
\end{commands}
For details, see \nameref{sec:webui-selinux}.

\item Restart Apache (to load configuration provided by bareos-webui, see \nameref{sec:webui-apache})

\item \label{item:webui-create-user}
Use \command{bconsole} to create a user with name \name{admin} and password \name{secret} and permissions defined in \resourcename{Dir}{Profile}{webui-admin}:
\begin{bconsole}{add a named console}
*<input>configure add console name=admin password=secret profile=webui-admin</input>
\end{bconsole}
Of course, you can choose other names and passwords.
For details, see \nameref{sec:webui-console}.

\item Login to http://HOSTNAME/bareos-webui with username and password as created in \ref{item:webui-create-user}.

\end{enumerate}


\subsection{Configuration Details}


\subsubsection{Create a restricted consoles}
    \label{sec:webui-console}

There is not need, that \bareosWebui itself provide a user management.
Instead it uses so named \resourcetype{Dir}{Console} defined in the \bareosDir.
You can have multiple consoles with different names and passwords, sort of like multiple users, each with different privileges.

At least one \resourcetype{Dir}{Console} is required to use the \bareosWebui.

To allow a user with name \name{admin} and password \name{secret} to access the \bareosDir
with permissions defined in the \resourcename{Dir}{Profile}{webui-admin} (see \nameref{sec:webui-profile}),
either
\begin{itemize}
\item create a file \file{/etc/bareos/bareos-dir.d/console/admin.conf} with following content:
\begin{bareosConfigResource}{bareos-dir}{console}{admin}
Console {
  Name = "admin"
  Password = "secret"
  Profile = "webui-admin"
}
\end{bareosConfigResource}

To enable this, reload or restart your \bareosDir.
\item or use the \command{bconsole}:
\begin{bconsole}{add console}
*<input>configure add console name=admin password=secret profile=webui-admin</input>
\end{bconsole}
\end{itemize}


For details, please read \nameref{DirectorResourceConsole}.



\subsubsection{Configuration of profile resources}
    \label{sec:webui-profile}

The package \package{bareos-webui} comes with a predefined profile for \bareosWebui: \resourcename{Dir}{Profile}{webui-admin}.

If your \bareosWebui is installed on another system then the \bareosDir, you have to copy the profile to the \bareosDir.

This is the default profile, giving access to all Bareos resources and allowing all commands used by the \bareosWebui:

\begin{bareosConfigResource}{bareos-dir}{profile}{webui-admin}
Profile {
  Name = webui-admin
  CommandACL = !.bvfs_clear_cache, !.exit, !.sql, !configure, !create, !delete, !purge, !sqlquery, !umount, !unmount, *all*
  Job ACL = *all*
  Schedule ACL = *all*
  Catalog ACL = *all*
  Pool ACL = *all*
  Storage ACL = *all*
  Client ACL = *all*
  FileSet ACL = *all*
  Where ACL = *all*
  Plugin Options ACL = *all*
}
\end{bareosConfigResource}

The \resourcetype{Dir}{Profile} itself does not give any access to the \bareosDir,
but can be used by \resourcetype{Dir}{Console}, which do give access to the \bareosDir, see \nameref{sec:webui-console}.

For details, please read \nameref{DirectorResourceProfile}.

\subsubsection{SELinux}
\label{sec:webui-selinux}
\index[general]{SELinux!bareos-webui}

To use \bareosDir on a system with SELinux enabled,
permission must be given to HTTPD to make network connections:
\begin{commands}{}
setsebool -P httpd_can_network_connect on
\end{commands}


\subsubsection{Configure your Apache Webserver}
\index[general]{Apache!bareos-webui}
\label{sec:webui-apache}

The package \package{bareos-webui} provides a default configuration for Apache.
Depending on your distribution, it is installed at \file{/etc/apache2/conf.d/bareos-webui.conf}, \file{/etc/httpd/conf.d/bareos-webui.conf} or \file{/etc/apache2/available-conf/bareos-webui.conf}.

The required Apache modules, \argument{setenv}, \argument{rewrite} and \argument{php} are enabled via package postinstall script.
However, after installing the \package{bareos-webui} package, you need to restart your Apache webserver manually.

\subsubsection{Configure your /etc/bareos-webui/directors.ini}
\index[general]{Configuration!WebUI}
\label{sec:webui-configuration-files}

Configure your directors in \file{/etc/bareos-webui/directors.ini} to match your settings.

The configuration file \file{/etc/bareos-webui/directors.ini} should look similar to this:

\begin{bconfig}{/etc/bareos-webui/directors.ini}
;
; Bareos WebUI Configuration
; File: /etc/bareos-webui/directors.ini
;

;
; Section bareos-dir
;
[bareos-dir]

; Enable or disable director. Possible values are "yes" or "no", the default is "yes".
enabled = "yes"

; Fill in the IP-Address or FQDN of your director.
diraddress = "localhost"

; Default value is 9101
dirport = 9101

; Set catalog to explicit value if you have multiple catalogs,
; the default value is "MyCatalog".
;catalog = "MyCatalog"

;
; Section remote-dir
;
[remote-dir]
enabled = "no"
diraddress = "hostname"
;dirport = 9101
;catalog = "MyCatalog"
;tls_verify_peer = false
;server_can_do_tls = false
;server_requires_tls = false
;client_can_do_tls = false
;client_requires_tls = false
;ca_file = ""
;cert_file = ""
;cert_file_passphrase = ""
;allowed_cns = ""
\end{bconfig}

You can add as many directors as you want, also the same host with a different name and different catalog, if you have multiple catalogs.

\subsubsection{Configure your /etc/bareos-webui/configuration.ini}

Since \sinceVersion{}{/etc/bareos-webui/configuration.ini}{16.2.2}
you are able to configure some parameters of the \bareosWebui to your needs.

\begin{bconfig}{/etc/bareos-webui/configuration.ini}
[session]
# Default: 3600 seconds
timeout=3600

[tables]
# Define a list of pagination values.
# Default: 10,25,50,100
pagination_values=10,25,50,100

# Default number of rows per page
# for possible values see pagination_values
# Default: 25
pagination_default_value=25

# State saving - restore table state on page reload.
# Default: false
save_previous_state=false

[autochanger]
# Pooltype for label to use as filter.
# See pooltype in output of bconsole: list pools
# Default: none
labelpooltype=scratch
\end{bconfig}

\section{Upgrade from 15.2 to 16.2}

\subsection{Console/Profile changes}

The \bareosWebui Director profile shipped with Bareos 15.2 (\resourcename{Dir}{Profile}{webui} in the file \file{/etc/bareos/bareos-dir.d/webui-profiles.conf}) is not sufficient to use the \bareosWebui 16.2.
This has several reasons:
\begin{enumerate}
  \item The handling of \dt{Acl}s is more strict in Bareos 16.2 then it has been in Bareos 15.2.
    Substring matching is no longer enabled, therefore you need to change \bcommand{.bvfs_*} to \bcommand{.bvfs_.*}
    in your \linkResourceDirective{Dir}{Profile}{Command ACL} to have a proper regular expression.
    Otherwise the restore module won't work any longer, especially the file browser.

  \item The \bareosWebui 16.2 uses following additional commands:
\begin{itemize}
\item .help
\item .schedule
\item .pools
\item import
\item export
\item update
\item release
\item enable
\item disable
\end{itemize}

\end{enumerate}

If you used an unmodified \file{/etc/bareos/bareos-dir.d/webui-profiles.conf} file,
the easiest way is to overwrite it with the new profile file \file{/etc/bareos/bareos-dir.d/profile/webui-admin.conf}.
The new \resourcename{Dir}{Profile}{webui-admin} allows all commands, except of the dangerous ones, see \nameref{sec:webui-profile}.

\subsection{directors.ini}

Since 16.2 it is possible to work with different catalogs. Therefore the catalog parameter has been introduced. If you don't set a catalog explicitly the default \resourcename{Dir}{Catalog}{MyCatalog} will be used. Please see \nameref{sec:webui-configuration-files} for more details.

\subsection{configuration.ini}

Since 16.2 the \bareosWebui introduced an additional configuration file besides the directors.ini file named configuration.ini where you are able to adjust some parameters of the webui to your needs. Please see \nameref{sec:webui-configuration-files} for more details.


\section{Additional information}

\subsection{NGINX}
\index[general]{nginx!bareos-webui}

If you prefer to use \bareosWebui on Nginx with php5-fpm instead of Apache,
a basic working configuration could look like this:

\begin{bconfig}{bareos-webui on nginx}
server {

        listen       9100;
        server_name  bareos;
        root         /var/www/bareos-webui/public;

        location / {
                index index.php;
                try_files $uri $uri/ /index.php?$query_string;
        }

        location ~ .php$ {

                include snippets/fastcgi-php.conf;

                # php5-cgi alone:
                # pass the PHP
                # scripts to FastCGI server
                # listening on 127.0.0.1:9000
                #fastcgi_pass 127.0.0.1:9000;

                # php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;

                # APPLICATION_ENV:  set to 'development' or 'production'
                #fastcgi_param APPLICATION_ENV development;
                fastcgi_param APPLICATION_ENV production;

        }

}
\end{bconfig}

This will make the \bareosWebui accessible at http://bareos:9100/ (assuming your DNS resolve the hostname \host{bareos} to the NGINX server).