[OGo-Users] Migration of ogo
Adam Tauno Williams
users@opengroupware.org
Thu, 03 Apr 2008 11:00:38 -0400
> this week one of out customers wants to have a new
> machine for his ogo-installation.
> Suse 9.2->10.3
> RealWare -> VMWware
> Postgres 7.4 -> 8.2
> Ogo1.0Beta(r1412) -> OGo1.1(trunc) (r2051)
> so we decided to do an export of data:
> pg_dump -aD -f ogo.sql -U OGo OGo
Why "-aD", I always use --format=c
> we looked at ogo.sql:
> oh :) table_version and object_model have to
> be removed!! OK first step
Not certain what you mean here; I've updated OGo many times and never
had to diddle with "table_version, etc.. Do you mean in Defaults or in
the database?
> then: the standard objects are in ogo.sql and
> in the database so:
> ----------------------------------------------
> #!/bin/bash
> su postgres -c "dropdb OGo"
> su postgres -c "dropuser OGo"
> /usr/local/share/opengroupware.org-1.1/dbsetup/database_setup_psql.sh initial
> psql OGo OGo <<EOF
> delete from news_article;
> delete from company_info;
> delete from staff;
> delete from team;
> delete from person;
> EOF
I think you are making this too complicated. Do a proper backup and
then restore with -
dropdb OGo
createdb -E UTF-8 -O OGo OGo
createlang --username=postgres --dbname=OGo plpgsql
pg_restore --format=c \
--dbname=OGo < /tmp/OGo.Fc.pg_dump > /tmp/restore.out
vacuumdb OGo
A data-only dump is likely not to work as you might loose sequence
values, etc... that will cause problems.
> and after some fiddeling ..... it works (2 days later).
> There are some questions:
> 1. Nobody uses the constraints? With the actual postgres
> release the inherits-feature is not usable with constraints!
Nope. Constraints are nice, but when all access is via Logic there
isn't much in the way of rogue updates to worry about.
> 2. Is there a regular way for upgrading?
dump & restore has always worked for us. The only real catch is that
between 1.0 and 1.1 you need to switch from LATIN-1 encoding to UTF-8.
That procedure is described in WMOGAG -
http://docs.opengroupware.org/Members/whitemice/wmogag/file_view
> 3. Is there a way for checking the constraints (possibly
> other things) in the database.
> 4. We are working with OGO/Skyrix for years and are very
> comfortable but every upgrade is like hell so:
> Who wants to do an upgrade-script with some checks?
> (of course for money)
I think the only catch for upgrading an old version might be
<http://mail.opengroupware.org/pipermail/users/2007-November/018301.html> and if using PostgreSQL 8.3 there is <http://mail.opengroupware.org/pipermail/users/2008-February/018668.html>