Skip to content

Commit

Permalink
updates to the UCS chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Dec 9, 2015
1 parent 53f7c85 commit 61099a0
Showing 1 changed file with 74 additions and 44 deletions.
118 changes: 74 additions & 44 deletions manuals/en/main/operating-system-univention-corporate-server.tex
Expand Up @@ -12,7 +12,7 @@ \subsubsection{Preamble}
\elink{App Center}{https://www.univention.de/produkte/univention-app-center/app-katalog/bareos/}
and therefore an Univention environment can easily be extended to provide backup functionality for the Univention servers as well as for the connected client systems. Using the Univention Management Console (UMC), you can also create backup jobs for client computers (Windows or Linux systems), without the need of editing configuration files.

The Bareos app is shipped with a default configuration for the director daemon and the storage daemon. As a result Bareos is able to backup your Univention server without manual configuration.
The Bareos Univention App is shipped with a default configuration for the director daemon and the storage daemon.

\warning{You need to review some Univention configuration registry (UCR) variables. Most likely, you will want to set the location where the backups are stored. Otherwise, you may quickly run out of disk space on your backup server!}

Expand All @@ -24,7 +24,7 @@ \subsubsection{Quick Start}
\item Determine the space requirements and where to store your backup data
\item Set the \parameter{baroes/*} UCR variables according to your needs, see \nameref{sec:UCR}
\item Restart \command{bareos-dir}, \command{bareos-sd} and \command{bareos-fd} (or simply reboot the server)
\item Install the Bareos file daemon on clients and copy configuration file from \file{/etc/bareos/autogenerated/client-configs/<hostname>.conf}
\item Install the Bareos file daemon on clients and copy configuration file from \file{/etc/bareos/autogenerated/client-configs/<hostname>.conf}, see \nameref{sec:UniventionAddClient}
\item Enable backup jobs for clients in the Univention Management Console
\end{itemize}

Expand Down Expand Up @@ -99,7 +99,7 @@ \subsubsection{Setup}

After installation of the Bareos app, Bareos is ready for operation. A default configuration is created automatically.

Bareos consists of three daemons called \command{director} (or \command{bareos-dir}), \command{storage-daemon} (or \command{bareos-sd}) and \command{filedaemon} (or \command{bareos-fd}). All three daemons are started right after the installation by the univention app center.
Bareos consists of three daemons called \command{director} (or \command{bareos-dir}), \command{storage-daemon} (or \command{bareos-sd}) and \command{filedaemon} (or \command{bareos-fd}). All three daemons are started right after the installation by the Univention App Center.

If you want to enable automatic backups of the server, you need to set the Univention configuration registry (UCR) variable \parameter{bareos/backup_myself} to \argument{yes} and reload the director daemon.

Expand Down Expand Up @@ -145,11 +145,11 @@ \subsubsection{Backup Schedule}
\end{itemize}
\end{description}

That means full backups will be written every first saturday at 21:00 o'clock, differential backups every 2nd to 5th saturday at 21:00 o'clock and incremental backups from monday to friday at 21:00 o'clock. So you have got one full backup every month, four weekly differential and 20 daily differential backups per month.
That means full backups will be written every first saturday at 21:00 o'clock, differential backups every 2nd to 5th saturday at 21:00 o'clock and incremental backups from monday to friday at 21:00 o'clock. So you have got one full backup every month, four weekly differential and 20 daily incremental backups per month.

This schedule is active for the univention server backup of itself and all other clients, which are backed up through the \command{bareos-dir} on the univention server.
This schedule is active for the Univention server backup of itself and all other clients, which are backed up through the \command{bareos-dir} on the Univention server.

There is also a special backup task, which is the Bareos backup of itself for a possible disaster recovery. This backup has got its own backup cycle which starts after the main backups. The backup consists of a database backup for the metadata of the Bareos backup server and a backup of the Bareos configuration files under \directory{/etc/bareos/}.
There is also a special backup task, which is the Bareos backups itself for a possible disaster recovery. This backup has got its own backup cycle which starts after the main backups. The backup consists of a database backup for the metadata of the Bareos backup server and a backup of the Bareos configuration files under \directory{/etc/bareos/}.



Expand Down Expand Up @@ -200,31 +200,77 @@ \subsubsection{Backup Storage}
root@ucs:/# <input>service bareos-sd restart</input>
\end{commands}

\subsubsection{Bareos Webui Configuration}

After installation you just need to setup your login credentials via UCR variables.
Therefore, set the Univention configuration registry (UCR) variable
\parameter{bareos/webui/console/user1/username} and
\parameter{bareos/webui/consoles/user1/password}
according to your needs. The director configuration is automatically reloaded if one of those two variables changes.

\subsubsection{Client and backup job management}

\paragraph{Add a client to backup on your Domaincontroller master}$\;$
Alternatively you can also set those UCR variables via commandline.

\begin{commands}{Example for changing webui login credentials}
root@ucs:~# <input>ucr set bareos/webui/console/user1/username="bareos"</input>
Setting bareos/webui/console/user1/username
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.
root@ucs:~# <input>ucr set bareos/webui/console/user1/password="secret"</input>
Setting bareos/webui/console/user1/password
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.
\end{commands}
The univention Bareos application comes with an automatism for the client and job configuration. If you want to add a client to the Bareos director configuration, you need to set the checkbox to true, as you can see in the screenshot below.
When your login credentials are set, you can login into Bareos Webui by following the entry in your Administration UCS Overview or directly via \url{https://<UCS_SERVER>/bareos-webui/}.
\begin{center}
\includegraphics[width=0.8\textwidth]{\idir univention-client-job-activation}
\includegraphics[width=0.8\textwidth]{\idir univention-ucs-overview-administration}
\end{center}
After having enabled the Bareos backup for a client on your Domaincontroller master, where usually your director- and storage-daemon are running, it will be configured automatically and loaded into the bareos-director configuration. Therefore Bareos comes with a special cronjob called \command{univention-bareos}, which performs a restart every day at 20:30 o'clock (Remember: backups will be started at 21:00 o'clock!). That said, if you add a client to backup, a Client Resource and a Job Resource in e.g. \file{/etc/bareos/autogenerated/clients/testw1.example.com.include} will be generated and included via \file{/etc/bareos/autogenerated/clients.include} to make your new client known to the Director.
\paragraph{Install and initial configuration of a client}$\;$
Even if the corresponding client configuration for the file daemon is generated automatically on your Domaincontroller master as mentioned above, it needs to be copied manually to the client e.g. via scp. The generated client configuration is located under \file{/etc/bareos/autogenerated/fd-configs/testw1.example.com.conf}.
\subsubsection{Add a client to the backup}
\label{sec:UniventionAddClient}
\paragraph{Overview}
After you have \ilink{installed bareos-fd on the client}{SecondClient}, copy the generated client configuration over to the client and save it to \file{/etc/bareos/bareos-fd.conf}. Finally, restart the bareos-fd with the copied configuration.
\begin{itemize}
\item Install the Bareos client on the target system, see \ilink{Adding a Bareos Client}{SecondClient}
\item Use the Univention Management Console to add the client to the backup, see the screenshot below
\item Copy the filedaemon configuration file from the Univention server to the target system
\end{itemize}
\begin{commands}{copy client configuration from the server to the testw1.example.com client}
\subparagraph{Server-side}
The Univention Bareos application comes with an automatism for the client and job configuration. If you want to add a client to the Bareos director configuration, you need use the Univention Management Console, select the client you want to backup and set the \argument{enable backup job} checkbox to true, as shown in the screenshot below.
\begin{center}
\includegraphics[width=0.8\textwidth]{\idir univention-client-job-activation}
\end{center}
If the name of the client is \name{testw1.example.com}, corresponding configuration files will be generated/adapted:
\begin{itemize}
\item creates \file{/etc/bareos/autogenerated/fd-configs/testw1.example.com.conf}
\item creates \file{/etc/bareos/autogenerated/clients/testw1.example.com.include}
\item extends \file{/etc/bareos/autogenerated/clients.include}
\end{itemize}
The generated configuration files under \directory{/etc/bareos/autogenerated/fd-configs/} are intended for the target systems.
After you have \ilink{installed the Bareos client on the target system}{SecondClient},
copy the generated client configuration over to the client and save it to
\begin{itemize}
\item on Linux: \file{/etc/bareos/bareos-fd.conf}
\item on Windows: \file{C:\Program Files\Bareos\bareos-fd.conf}
\end{itemize}
\begin{commands}{copy client configuration from the server to the testw1.example.com client (Linux)}
root@ucs:~# <input>CLIENTNAME=testw1.example.com</input>
root@ucs:~# <input>scp /etc/bareos/autogenerated/fd-configs/${CLIENTNAME}.conf root@${CLIENTNAME}:/etc/bareos/bareos-fd.conf</input>
\end{commands}
\paragraph{Client and job configuration}$\;$
\paragraph{Background}
All clients will be listed in the \file{/etc/bareos/autogenerated/clients.include} which points to a \file{/etc/bareos/autogenerated/clients/xxx.conf}. If you disable the Bareos backup for a client, the client will not be removed from the configuration files. Only the backup job will be set inactive.
Expand All @@ -244,7 +290,16 @@ \subsubsection{Client and backup job management}
-rw-r--r-- 1 root root 439 16. Mai 15:15 windows.template
\end{commands}
The settings for each job resource are set by the job definition from the bareos-director default configuration and the template files you see above. The client configuration file contains, as you can see below, the connection information and the job information:
The settings for each job resource are set by the job definition from the bareos-director default configuration and the template files you see above.
The files
\begin{itemize}
\item \file{/etc/bareos/autogenerated/clients/generic.template}
\item \file{/etc/bareos/autogenerated/clients/windows.template}
\end{itemize}
are used as templates for new clients. For Windows clients the file \file{windows.template} is used, the \file{generic.template} is used for all other client types.
The client configuration file contains, as you can see below, the connection information and the job information:
\begin{commands}{}
root@ucs:/etc/bareos/autogenerated/clients# <input>cat testw2.example.com.include</input>
Expand All @@ -266,30 +321,5 @@ \subsubsection{Client and backup job management}
}
\end{commands}
\subsubsection{Bareos Webui Configuration}

After installation you just need to setup your login credentials via UCR variables.
Therefore, set the Univention configuration registry (UCR) variable
\parameter{bareos/webui/console/user1/username} and
\parameter{bareos/webui/consoles/user1/password}
according to your needs. The director configuration is automatically reloaded if one of those two variables changes.


Alternatively you can also set those UCR variables via commandline.

\begin{commands}{Example for changing webui login credentials}
root@ucs:~# <input>ucr set bareos/webui/console/user1/username="bareos"</input>
Setting bareos/webui/console/user1/username
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.
root@ucs:~# <input>ucr set bareos/webui/console/user1/password="secret"</input>
Setting bareos/webui/console/user1/password
File: /etc/bareos/bareos-dir.conf
[ ok ] Reloading Bareos Director: bareos-dir.
\end{commands}
When your login credentials are set, you can login into Bareos Webui by following the entry in your Administration UCS Overview or directly via \url{https://<UCS_SERVER>/bareos-webui/}.
\begin{center}
\includegraphics[width=0.8\textwidth]{\idir univention-ucs-overview-administration}
\end{center}
% After having enabled the Bareos backup for a client on your Domaincontroller master, where usually your director- and storage-daemon are running, it will be configured automatically and loaded into the bareos-director configuration.
Bareos comes with a special cronjob called \command{univention-bareos}, which performs a restart every day at 20:30 o'clock (Remember: backups will be started at 21:00 o'clock!) and safely reload the configuration.

0 comments on commit 61099a0

Please sign in to comment.