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

ERP 2.50:Migration to Professional Appliance



This document explains the process of migrating an Openbravo ERP installation to a Professional Subscription Appliance. An example scenario is the migration of Openbravo ERP from the Community Edition Appliance to the Professional Appliance.


This guide takes the following assumptions:


First, do a complete backup of Openbravo ERP and save it in a secure location. Once this is done stop Tomcat.

Bulbgraph.png   And make sure you are running OpenbravoERP 2.50 community appliance with postgres database.

Export from old system

Source code

In the Professional Appliance the source code root directory is located in /opt/OpenbravoERP. If you already have the ERP in that location you can skip this paragraph. Otherwise, rename the source.path property to this new location, as well as the root directory itself:

$ su -
$ mv /opt/AppsOpenbravo /opt/OpenbravoERP

Next, edit /opt/OpenbravoERP/config/ and change the source.path property to /opt/OpenbravoERP:


If the attachments directory was located inside the sample /opt/AppsOpenbravo directory, make sure to also adjust the new path of the attach.path property.

Then, launch a complete compilation with the openbravo system user to make sure that the system is running well with this new configuration:

$ ant compile.complete.deploy


To create a database dump with the openbravo system user:

$ pg_dump -U tad -h localhost -F c -b -v -f /opt/OpenbravoERP/db_backup.dmp openbravo

In this case, the username is tad, the database is listening at localhost and the database name is openbravo.


Package and transfer the result to the Professional Appliance machine:

$ tar zcpvf /tmp/OpenbravoERP.tgz /opt/OpenbravoERP
$ scp /tmp/OpenbravoERP.tgz openbravo@obpshost:/tmp

If the attachments are located outside the /opt/OpenbravoERP directory, then make sure to append the directory location to the tar command.

NOTE: In the example above obpshost is an Openbravo Professional Subscription Appliance, so you'll need to first have SSH access to this machine. Follow these instructions to learn how to transfer your public key and to generate one if needed.

Import to Professional Appliance

Source code

After booting the Professional Appliance, remove the running Openbravo ERP instance:

$ su -
$ /etc/init.d/tomcat stop
$ rm -rf /opt/OpenbravoERP /var/lib/tomcat/webapps/openbravo

Then uncompress the transferred tarball, making sure that the permissions are correct:

$ tar zxpvf /tmp/OpenbravoERP.tgz -C /
$ chown -R openbravo:openbravo /opt/OpenbravoERP
$ chmod -R 775 /opt/OpenbravoERP


Firstly, create a new role and a database:

$ psql -d postgres -U postgres
DROP DATABASE openbravo;
VALID UNTIL 'infinity';
UPDATE pg_authid SET rolcatupdate=true WHERE rolname='tad';

Then import the previously exported file:

$ pg_restore -i -U tad -h localhost -d openbravo -v -O /opt/OpenbravoERP/db_backup.dmp

Finally vacuum the database to increase performance:

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

Deploy and test

Deploy the new system with the openbravo system user:

$ cd /opt/OpenbravoERP
$ ant compile.complete.deploy
$ su -
$ /etc/init.d/tomcat start

And test the migrated ERP using your web browser.

Appendix: Manage SSH keys

This page is used to submit your SSH public key data. Multiple keys may be submitted at once; keys should be separated by a newline.

Password authentication is not accepted by the appliance's SSH system, a public/private key pair is required. This means you must create one if you already do not have it.


To generate a public/private key pair:

$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/johndoe/.ssh/id_dsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/johndoe/.ssh/id_dsa.
Your public key has been saved in /home/johndoe/.ssh/
The key fingerprint is:
e9:f2:8f:06:0c:ee:b0:e0:48:3c:1b:ce:31:e8:62:e5 johndoe@laptop
The key's randomart image is:
+--[ DSA 1024]----+
|                 |
|                 |
|                 | 
|    .    .       |
|o  . o  S        |
|oB... o.         |
|B.O+  ...        |
|oB.E.  o..       |
|o      .o..      |

The contents of /home/johndoe/.ssh/ should be copied and added to the list of keys.


Use PuTTYgen to generate a public/private key pair:

  1. Download and install Putty using the PuTTY installer.
  2. Open PuTTYgen.
  3. Make sure that SSH2 DSA is chosen in the parameters section.
  4. Click Generate and move the mouse over the grey area to create entropy for the keys.
  5. Enter a personal passphrase in Key passphrase and Confirm passphrase. Do not forget this passphrase, you will need it to access the server. Note that the chosen passphrase is a local one on your own machine that allows you access to your keys. This prevents other users accessing the server even if they intercept the private key.
  6. Save the public key as, e.g. pub_key on your hard drive.
  7. Save the private key as, e.g. priv_key on your hard drive.

At the top section of the window copy the contents of the section Public key for pasting into OpenSSH authorized keys file, and paste it into a new line of the Manage SSH keys window.

Retrieved from ""

This page has been accessed 5,996 times. This page was last modified on 14 June 2011, at 11:04. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.