Bacula-users

Re: [Bacula-users] Migrating to Newer Version of PGSQL

2013-03-25 16:46:13
Subject: Re: [Bacula-users] Migrating to Newer Version of PGSQL
From: Doug Sampson <dougs AT dawnsign DOT com>
To: bacula-users at lists.sourceforge.net <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 25 Mar 2013 20:42:20 +0000
> I need to migrate Bacula from PGSQL 8.3 as it's being EOL'ed. The newest
> version of PGSQL available in the FreeBSD ports tree is 9.2. Below are the
> steps I've taken to describe the migration process:
> 
> ########################################################
> 
> Backup PGSQL config file(s)
>       /home/pgsql/pg_hba.conf
>       /home/pgsql/postgresql.conf
> 
> Backup Bacula config file(s)
>       /usr/local/etc/bacula-dir.conf
>       /usr/local/etc/bacula-fd.conf
>       /usr/local/etc/bacula-sd.conf
>       /usr/local/etc/bconsole.conf
> 
> Dump PGSQL Bacula DB
>       /usr/local/bin/pg_dump bacula -v /home/bacula.sql
> 
> Rename PG data directory
>       mv /home/pgsql /home/pgsql.old
> 
> Stop PGSQL & Bacula processes
>       /usr/local/etc/rc.d/z-bacula.sh stop
>       /usr/local/etc/rc.d/postgresql stop
> 
> Uninstall Bacula Server & Client and any other Bacula package
>       cd /usr/ports/sysutils/bacula-server && make deinstall clean
>       cd /usr/ports/sysutils/bacula-client && make deinstall clean
> 
> Uninstall Postgresql 8.3 Server & Client
>       cd /usr/ports/databases/postgresql83-server && make deinstall clean
>       cd /usr/ports/databases/postgresql83-client && make deinstall clean
> 
> Install Postgresql 9.2
>       Install /usr/ports/databases/postgresql92-server
>       Install /usr/ports/databases/postgresql92-client
> 
> Initialize PGSQL db
>       initdb -D /usr/local/pgsql/data
>       if this gives you an error message
>       stop pgsql then 'rm -rf /home/pgsql/data'
>       start pgsql
>       then 'initdb -D /home/pgsql/data'   - should work this time
> 
> Install Bacula
>       cd /usr/ports/sysutils/bacula-server && make install clean
>       cd /usr/ports/sysutils/bacula-client && make install clean
> 
> Restore PGSQL config files
>       /home/pgsql/pg_hba.conf
>       /home/pgsql/postgresql.conf
> 
> Restore Bacula config files
>       /usr/local/etc/bacula-dir.conf
>       /usr/local/etc/bacula-fd.conf
>       /usr/local/etc/bacula-sd.conf
>       /usr/local/etc/bconsole.conf
> 
> Configure Bacula as follows:
>       make pgsql member of bacula group
>       su pgsql
>       /usr/local/share/bacula/create_bacula_database
>       /usr/local/share/bacula/make_bacula_tables
>       /usr/local/share/bacula/grant_bacula_privileges
>       psql bacula < bacula.sql
>               If cannot retrieve bacula.sql file for some reason, can
>               restore from the most recent tape as follows:
>               bextract <exact volume name of catalog> ('man bextract' for
>               more details)
>       start pgsql
>       start bacula
>       remove pgsql as member of bacula group
> 
> Test
>       start bconsole and verify status of director
>       start a simple backup job and verify
> 
> ########################################################
> 
> 
> Questions:
> 
> 1) Do I actually need to remove the bacula packages?
> 
> 2) Are there any special steps that I'm missing when configuring the
> bacula databases? Do I need to run 'update-bacula-tables' somewhere in
> there?
> 
> 3) Is PGSQL 9.2 considered stable? 9.1 had some serious bugs but these
> appeared to have been squashed.
> 
> 4) Are there any special parameters I need to consider when going from
> PGSQL 8.3 to 9.2 especially in the postgresql.conf?
> 
> 5) Any other caveats?
> 
> 6) pg_upgrade: I came across this new function. Apparently you can upgrade
> databases from 8.3.x to 9.2.x with some caveats as described in the "
> Limitations in Upgrading from PostgreSQL 8.3" section of this link
> http://www.postgresql.org/docs/9.2/static/pgupgrade.html. If you've used
> this, would you care to share your experiences?
> 
> 
> Thanks in advance.
> 
> ~Doug


Comments anyone?

~Doug

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users