This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
/
install.tex
257 lines (190 loc) · 9.29 KB
/
install.tex
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
If you are like me, you want to get Bareos running immediately to get a feel
for it, then later you want to go back and read about all the details. This
chapter attempts to accomplish just that: get you going quickly without all
the details.
Bareos comes prepackaged for a number of Linux distributions.
So the easiest way to get to a running Bareos installation,
is to use a platform where prepacked Bareos packages are available.
Additional information can be found in the chapter \ilink{Operating Systems}{SupportedOSes}.
%\TODO{If you are using a platform, for which Bareos is not available in a prepackaged format,
%please refer to the \ilink{Building chapter}{compile}.}
If Bareos is available as a package,
only 4 steps are required to get to a running Bareos System:
\begin{itemize}
\item Subscribe to the repository according to your platform and version
\item Install the Bareos package
\item Prepare database backend
\item Start the daemons
\end{itemize}
This will start a very basic Bareos installation which will regularly backup a directory to disk.
In order to fit it to your needs, you'll have to adapt the configuration and might want to backup other clients.
\section{Subscribe to a Software Repository and Install Software}
You'll find Bareos binary package repositories at \url{http://download.bareos.org/bareos}.
Add the repository to your system.
You will find the public key in the repodata subdirectory
(for Debian the distribution directory itself).
See your distribution's documentation for details.
You will then have to install the package bareos.
This will install all client- and server components and the postgresql backend.
We recommend to use postgresql, therefore this is the default.
You can also use mysql or sqlite3
(where sqlite3 is intended for testing purposes only, by no means recommended for productive use).
If you want to use mysql rather than postgresql, you need two packages: bareos and bareos-database-mysql.
Here are some working examples:
\subsection{Install on RedHat based Linux Distributions}
\subsubsection{RHEL 6}
For adding the repository:
\begin{verbatim}
wget -O /etc/yum.repos.d/bareos.repo http://download.bareos.org/bareos/release/latest/RHEL_6/bareos.repo
\end{verbatim}
For using PostgreSQL backend:
\begin{verbatim}
yum install bareos bareos-database-postgresql
\end{verbatim}
For using MySQL backend:
\begin{verbatim}
yum install bareos bareos-database-mysql
\end{verbatim}
\subsubsection{CentOS 6}
Just replace RHEL by CentOS in the repository URL
\subsubsection{RHEL 5}
yum in RHEL 5 has slightly different behaviour as far as dependency resolving is concerned: it sometimes install a dependent package after the one that has the dependency defined. To make sure that it works, install the desired Bareos database backend package first in a separate step:
First add the repository using:
\begin{verbatim}
wget -O /etc/yum.repos.d/bareos.repo http://download.bareos.org/bareos/release/latest/RHEL_5/bareos.repo
\end{verbatim}
After that you can install with PostgreSQL backend:
\begin{verbatim}
yum install bareos-database-postgresql
yum install bareos
\end{verbatim}
Or install with MySQL backend:
\begin{verbatim}
yum install bareos-database-mysql
yum install bareos
\end{verbatim}
\subsubsection{CentOS 5}
Again, just replace RHEL with CentOS in the repository URL.
\subsubsection{Fedora 18}
For adding the repository:
\begin{verbatim}
wget -O /etc/yum.repos.d/bareos.repo http://download.bareos.org/bareos/release/latest/Fedora_18/bareos.repo
\end{verbatim}
After that you can install with PostgreSQL backend:
\begin{verbatim}
yum install bareos bareos-database-postgresql
\end{verbatim}
Or install with MySQL backend:
\begin{verbatim}
yum install bareos bareos-database-mysql
\end{verbatim}
\subsection{Install on SUSE based Linux Distributions}
\subsubsection{SLES11 SP3}
\begin{verbatim}
zypper addrepo --refresh http://download.bareos.org/bareos/release/latest/SLE_11_SP3/bareos.repo
zypper install bareos bareos-database-mysql
\end{verbatim}
In this example using mysql as database backend.
\subsubsection{openSUSE 13.1}
\begin{verbatim}
zypper addrepo --refresh http://download.bareos.org/bareos/release/latest/openSUSE_13.1/bareos.repo
zypper install bareos bareos-database-mysql
\end{verbatim}
\subsection{Install on Debian based Linux Distributions}
\subsubsection{Debian 7}
\begin{verbatim}
URL=http://download.bareos.org/bareos/release/latest/Debian_7.0/
printf "deb $URL /\n" > /etc/apt/sources.list.d/bareos.list
# add package key
wget -q $URL/Release.key -O- | apt-key add -
apt-get update
apt-get install bareos bareos-database-postgresql
\end{verbatim}
\subsubsection{Ubuntu 12.04}
\begin{verbatim}
URL=http://download.bareos.org/bareos/release/latest/xUbuntu_12.04/
printf "deb $URL /\n" > /etc/apt/sources.list.d/bareos.list
# add package key
wget -q $URL/Release.key -O- | apt-key add -
apt-get update
apt-get install bareos bareos-database-postgresql
\end{verbatim}
\section{Prepare Bareos database}
\label{CreateDatabase}
We assume that you have already your database installed and basically running.
Currently the database backend Postgres and MySQL are recommended. The Sqlite database backend is only intended for testing purposes.
The easiest way to set up a database is using an system account that have passwordless local access to the database.
Often this is the user root for MySQL and the user postgres for PostgreSQL.
\subsection{PostgreSQL}
If your are using PostgreSql and your PostgreSql admin is is postgres (default), use following commands:
\begin{verbatim}
su postgres -c /usr/lib/bareos/scripts/create_bareos_database
su postgres -c /usr/lib/bareos/scripts/make_bareos_tables
su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
\end{verbatim}
\subsection{MySQL}
Make sure, that \user{root} has direct access to the local MySQL server.
Check if the command \command{mysql} connects to the database without defining the the password.
This is the default on RedHat and SUSE distributions.
On other systems (Debian, Ubuntu),
create the file \file{/root/.my.cnf} with your authentication informations:
\begin{verbatim}
[client]
user=root
password=YourPasswordForAccessingMysqlAsRoot
\end{verbatim}
Setup the Bareos database tables by following commands:
\begin{verbatim}
/usr/lib/bareos/scripts/create_bareos_database
/usr/lib/bareos/scripts/make_bareos_tables
/usr/lib/bareos/scripts/grant_bareos_privileges
\end{verbatim}
After this, the file \file{/root/.my.cnf} is no longer required for Bareos.
\section{Start the daemons}
\begin{verbatim}
service bareos-dir start
service bareos-sd start
service bareos-fd start
\end{verbatim}
You will eventually have to allow access to the ports 9101-9103, used by Bareos.
Now you should be able to access the director using the bconsole.
\section{Overview about Bareos Packages}
Following Bareos Linux packages are available (release 13.2):
% generated by
% cd bareos:/bareos-13.2/SLE_11_SP3/x86_64
% rpm -qp --qf '%{NAME} & %{SUMMARY} \\\\\n' *bareos*.rpm
\begin{center}
\begin{tabular}{ | l | l | }
\hline
\textbf{Package Name} & \textbf{Description} \\ \hline
bareos & Bares All-In-One package (dir,sd,fd) \\
bareos-bat & Provide Bareos Admin Tool gui \\
bareos-bconsole & Provide ncurses administration console \\
bareos-client & Meta-All-In-One package client package \\
bareos-common & Generic libs needed by every package \\
bareos-database-common & Generic abstration lib for the sql catalog \\
bareos-database-mysql & Libs and tools for mysql catalog \\
bareos-database-postgresql & Libs and tools for postgresql catalog \\
bareos-database-sqlite3 & Libs and tools for sqlite3 catalog \\
bareos-database-tools & Provides bareos-dbcheck, bscan \\
bareos-devel & Devel headers \\
bareos-director & Provide bareos director daemon \\
bareos-filedaemon & Provide bareos file daemon service \\
bareos-storage & Provide bareos storage daemon \\
bareos-storage-tape & Provide bareos storage daemon tape support \\
bareos-tools & Provides bcopy, bextract, bls, bregex, bwild \\
bareos-traymonitor & Qt based tray monitor \\
\hline
\end{tabular}
\end{center}
Additionally, packages containing debug information are available.
These are named differently depending on the distribution (\package{bareos-debuginfo} or \package{bareos-dbg} or $\ldots$).
%bareos-debuginfo & Debug information for package bareos \\
%bareos-debugsource & Debug sources for package bareos \\
Not all packages are required to run Bareos.
\begin{itemize}
\item For the Bareos Director, the package \package{bareos-director} and one of \package{bareos-database-mysql}, \package{bareos-database-postgresql} or \package{bareos-database-sqlite3} are required (use \package{bareos-database-sqlite3} only for testing).
\item For the Bareos Storage Daemon, the package \package{bareos-storage} is required. If you plan to connect tape drives to the storage director, also install the package \package{bareos-storage-tape}. This is keeped separtly, because it has additional dependencies for tape tools.
\item On a client, only the package \package{bareos-filedaemon} is required. If you run it on a workstation, the packages \package{bareos-traymonitor} gives the user information about running backups.
\item On a Backup Administration system you need to install at least \package{bareos-bconsole} to have an interactive console to the Bareos Director.
\end{itemize}