Skip to content

Commit

Permalink
Added HOWTO-Chaper "Upgrade from Bacula 5.2 to Bareos" from bareos.or…
Browse files Browse the repository at this point in the history
…g at Appendix F.2

Signed-off-by: Joerg Steffens <joerg.steffens@bareos.com>
  • Loading branch information
Kristian authored and joergsteffens committed Nov 23, 2015
1 parent 0cb4061 commit b8c0482
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions manuals/en/main/backward-compability.tex
Expand Up @@ -92,3 +92,70 @@ \section{Compatibility between Bareos and Bacula}
\end{tabular}

Other combinations like Bacula director (dir) with Bareos storage daemon (sd) will not work. However this wasn't even possible with different versions of bacula-dir and bacula-sd.

\subsection{Upgrade from Bacula 5.2 to Bareos}
\index[general]{Upgrade from Bacula to Bareos}
\index[general]{Bareos!Upgrading}
\label{upgrade-from-bacula-to-bareos}

Upgrade is supported from Bacula version 5.2.x. If you are running any older version of Bacula, please update to 5.2 first (see Bacula documentation). \textbf{Note:} Updating from the latest Bacula 7.0 to Bareos has not been tested.

\subsubsection{Rename user and group before upgrading}

To have bareos running without any permission hazzle, it is recommended to rename the user and group "bacula" to the user and group "bareos" before upgrading. That way, we minimize the effort for the user to recheck all config files and the rights on every script/directory etc. involved in the existing setup.

The required commands should look something like this:

\begin{commands}{}
usermod -l bareos bacula
groupmod -n bareos bacula
\end{commands}

Proceed with the following steps:
\begin{itemize}
\item Stop bacula services
\item Backup your catalog database:
\begin{commands}{}
mysqldump bacula > /tmp/bacula_5.2.sql
\end{commands}
\item Make the user bareos have the same userid and the group bareos the same groupid as the user/group bacula had before. This will solve a lot of rights problems.
\item Install Bareos packages
\item Run the update script on the old bacula database:
\begin{commands}{}
/usr/lib64/bareos/update_bareos_tables
\end{commands}
\textbf{Note:} You need to change db\_name=bacula in the script before.
\item Backup upgraded DB:
\begin{commands}{}
mysqldump bacula > /tmp/bacula.2001.sql
\end{commands}
\item Create bareos database:
\begin{commands}{}
/usr/lib64/bareos/create_bareos_database}
\end{commands}
\item Insert backuped db into new database:
\begin{commands}{}
cat /tmp/bacula.2001.sql | mysql bareos
\end{commands}
\item Grant permissions:
\begin{commands}{}
cat usr/lib64/bareos/grant_mysql_privileges
\end{commands}
\item Adapt file permissions to bareos, if you have any file storage
\item Adapt configs (not complete)
\begin{itemize}
\item With bacula the default setting for pid files was \path|/var/run|, which may not work if the bareos-director runs as user bareos. Best way is to comment out the entry \command{Pid Directory = "/var/run"} in your director config. Bareos will set a working default value (supposed to be \path|/var/lib/bareos/|)
\end{itemize}
\end{itemize}

Renaming a postgresql database:

\begin{itemize}
\item Become postgresql user
\item psql template1
\begin{commands}{}
ALTER DATABASE bacula RENAME TO bareos;
ALTER USER bacula RENAME TO bareos;
ALTER USER bareos UNENCRYPTED PASSWORD 'password';
\end{commands}
\end{itemize}

0 comments on commit b8c0482

Please sign in to comment.