From b8c0482fccd33b06f6443441d77ea8fa0acc069c Mon Sep 17 00:00:00 2001 From: Kristian Date: Wed, 18 Nov 2015 14:12:35 +0100 Subject: [PATCH] Added HOWTO-Chaper "Upgrade from Bacula 5.2 to Bareos" from bareos.org at Appendix F.2 Signed-off-by: Joerg Steffens --- manuals/en/main/backward-compability.tex | 67 ++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/manuals/en/main/backward-compability.tex b/manuals/en/main/backward-compability.tex index deea75f4505..bdecc8f2619 100644 --- a/manuals/en/main/backward-compability.tex +++ b/manuals/en/main/backward-compability.tex @@ -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}