Log in / create account
View source | Discuss page | Page history | Printable version   
ADVERTISEMENT
Accounting eLearning Courses
Partnerships
SourceForge.net Logo
Openbravo ERP at SourceForge

SourceForge.net Logo
Openbravo POS at SourceForge

Open Solution Alliance Logo
Openbravo at Open Solution Alliance

How to Move Openbravo

Rating :
4.50/5
(2 votes cast)
You have to be registered to be able to vote

Contents

Introduction

This document explains the process of moving a Openbravo installation from one machine to another. An example scenario is the migration of Openbravo in production under Microsoft Windows to a Linux server.

Sources

Take the AppsOpenbravo directory and create a compressed and portable file with it (eg. zip or tar.gz).

Once we have the AppsOpenbravo.zip, we move to the target machine. Unzip this file to the desired target directory:

unzip AppsOpenbravo -d /opt/AppsOpenbravo

The main build.xml file has all the paths referred to the old system. To update them we launch the following ant task:

ant setup

Write all the paths taking into account the new location.

For systems without a graphical system it is perfectly possible to do this step by hand, by editing AppsOpenbravo/build.xml , AppsOpenbravo/config/dbCon5.xml and AppsOpenbravo/XmlPool.xml. If you have a different IP address, you need to change the IP or hostname in WebContent\WEB-INF\web.xml. See Configuring Openbravo manually.

Database

Export in old system

Oracle

To create a dump file of the database:

exp tad@XE file=c:\tmp\tad_ora.dmp log=c:\temp\tad_ora.log ownerr=tad statistics=none

In this case, the username is tad and the SID is XE.

PostgreSQL

To create a dump file of the database:

pg_dump -U tad -d openbravo -F c -b -v -f C:\temp\tad_pgsql.dmp

In this case the username is tad and the database name openbravo.

Import in the target system

Oracle

Firstly create the a new user:

sqlplus system@XE
create user tad identified by tad default tablespace users temporary tablespace temp;

Then import the previously exported file:

imp tad@XE file=/tmp/tad_ora.dmp log=/tmp/tad_ora.log fromuser=tad touser=tad

PostgreSQL

Firstly create a new user and a database:

psql -d postgres -U postgres
CREATE ROLE tad LOGIN PASSWORD 'tad' SUPERUSER CREATEDB CREATEROLE VALID UNTIL 'infinity';
UPDATE pg_authid SET rolcatupdate=true WHERE rolname='tad';
CREATE DATABASE openbravo WITH ENCODING='UTF8' OWNER=tad;
\q

Then import the previously exported file:

pg_restore -i -U tad -d openbravo -v -O /tmp/tad_pgsql.dmp

Finally it's recommended to vacuum the database to increase performance:

vacuumdb -U tad -d openbravo -f -z -v

Test

Compilation (optional)

This step is optional but highly recommended, just to make sure everything has been successful and the new build.xml file is correctly configured:

cd /opt/AppsOpenbravo
ant core.lib wad.lib trl.lib compile.complete

If it ends with a BUILD SUCCESSFUL then it's done.

Ready

Now the new system is ready to go. Copy the war file to the Tomcat webapps directory:

cd /opt/AppsOpenbravo
ant war
cp /opt/AppsOpenbravo/openbravo.war $CATALINA_BASE/webapps/

Start tomcat and that's all.

Retrieved from "http://wiki.openbravo.com/wiki/How_to_Move_Openbravo"

This page has been accessed 12,519 times. This page was last modified 08:32, 21 April 2008. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.


Category: Installation