View source | Discuss this page | Page history | Printable version   

How to Move Openbravo



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

Bulbgraph.png   If you use PostgreSQL you may be interested in using the snapshot utility explained in this blog post.


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

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

unzip -d /opt/OpenbravoERP and log4j.lcf files have all the paths referred to the old system. To update them, move to config/setup-tool folder and launch the graphical assistant (wizard):

Note that these wizards can also be run in a text mode without a graphical system. This is auto-detected.

Before starting with compilation, please check that and log4j.lcf files (inside config directory) have been properly configured. If not, edit them manually. Write all the paths taking into account the new location.

For systems prior to Openbravo ERP 2.40 (e.g., 2.35 MP5) you will have to modify:

  • OpenbravoERP/build.xml
  • OpenbravoERP/config/
  • OpenbravoERP/config/dbCon5.xml
  • OpenbravoERP/config/XmlPool.xml
  • OpenbravoERP/config/log4j.lcf
  • If you have a different IP address, you need to change the IP or hostname in WebContent\WEB-INF\web.xml.

For this purpose, edit these files manually or run:

ant -f build.xml.template setup


Bulbgraph.png   If you have installed Openbravo 3.0 with Postgres as the database form a package manager (such as apt-get) the DBMS will not be at the standard postmaster port, but at port 5932. Check the file for database details and alter scripts below as required.

Export in old system


To create a dump file of the database:

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

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


To create a dump file of the database:

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

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

Import in the target system


Firstly create a new user:

sqlplus system@XE
create user tad identified by tad default tablespace users temporary tablespace temp;
grant dba to tad;
grant create session     to tad;
grant alter  session     to tad;
grant create table       to tad;
grant create procedure   to tad;
grant create trigger     to tad;
grant create view        to tad;
grant create sequence    to tad;
alter user tad quota unlimited on users;

Then import the previously exported file:

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


Firstly create a new user and a database:

psql -d postgres -U postgres

Then import the previously exported file:

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

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

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


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/OpenbravoERP
ant compile.complete.deploy

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


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

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

Start tomcat and that's all.

Retrieved from ""

This page has been accessed 77,449 times. This page was last modified on 13 September 2018, at 14:12. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.