Migrating to Etendo (from Openbravo)
Overview
This guide provides the necessary information to migrate an existing Openbravo instance to a new Etendo instance (in its latest release).
Requirements
Before the migration process begins, either if it is done on Linux or on Windows, make sure to have the following items:
Info
- Current Openbravo instance updated to 21Q3.2 (How to upgrade?)
- If previous installation had custom patches applied, they must be ready to be applied in an 21Q3.2 updated environment.
- Database should not have local changes.
- Enough disk space for new installation.
- Environment license and GitHub name and token (Create the credentials by following this guide).
Warning
- The server where the database is hosted needs to have enough free space to hold a copy of the current database.
- The server where the sources are hosted also needs to be able to hold a copy of the current sources.
- Attachments are kept in the same place as they were before.
Instructions for the Migration Process
Before starting the migration
It is necessary to ensure following the next steps:
-
Stop the Tomcat Server.
Info
Depending on your server, this command may need to be changed.
-
Create a backup of your instance.
Manual Migration Process
These are the steps to follow for the manual migration from OpenbravoERP to Etendo Classic:
-
Create and enter the folder Etendo Classic.
-
Insert the etendo_base sources in the Etendo Classic folder. They can be extracted after downloading Etendo from Resources. To do this, use your gitHub user and token.
-
The
gradle.properties
file has default params but if needed this can be changed.Note
Remember to set up the GitHub user and token since they are used to expand private modules. Create the credentials by following the Use of Repositories technical guide.
gradle.propertiesgithubUser= githubToken= context.name=etendo bbdd.sid=etendo bbdd.port=5432 bbdd.systemUser=postgres bbdd.systemPassword=syspass bbdd.user=tad bbdd.password=tad
Info
Check if it is necessary to keep the Openbravo database or create a new one for Etendo. In case of creating a new one, use the previous Openbravo one as a base.
-
In a new terminal opened in
EtendoERP
folder, run in the - Run in the terminal
-
Move the existing modules from
Openbravo/modules
folder to theEtendoERP/modules
folder, except for the following ones:Warning
com.smf.securewebservices
com.smf.smartclient.boostedui
com.smf.smartclient.debugtools
org.openbravo.advpaymentmngt
org.openbravo.apachejdbcconnectionpool
org.openbravo.base.weld
org.openbravo.client.application
org.openbravo.client.htmlwidget
org.openbravo.client.kernel
org.openbravo.client.myob
org.openbravo.client.querylist
org.openbravo.client.widgets
org.openbravo.financial.paymentreport
org.openbravo.reports.ordersawaitingdelivery
org.openbravo.service.datasource
org.openbravo.service.integration.google
org.openbravo.service.integration.openid
org.openbravo.service.json
org.openbravo.userinterface.selector
org.openbravo.userinterface.skin.250to300Comp
org.openbravo.userinterface.smartclient
org.openbravo.utility.cleanup.log
org.openbravo.v3
org.openbravo.v3.datasets
org.openbravo.v3.frameworkThese modules will already be in the
EtendoERP/modules_core
folder since they are core modules in Etendo. -
Run
Info
Compilation errors associated with API changes may occur due to the version change in custom modules. If this happens, make sure to fix them by using the documented GitHub issues.
Post Migration Configuration
Remove previous instance deployed context
Warning
Make sure this step is done before starting Tomcat, otherwise you will risk having two environments running at the same time, which can cause problems (especially when background processes are involved).
Start Tomcat
Info
Depending on your server, this command may need to be changed.
Attachments Configuration
Warning
Before removing your previous instance, make sure you migrate your attachment files.
In the migration process, the attachments directory configuration is not changed. To move them to a new folder (for example /opt/EtendoERP/attachments
), you must edit the Openbravo.properties
file:
vi /opt/EtendoERP/config/Openbravo.properties
## Change the attach.path property like this (do not include the #):
## attach.path=/opt/EtendoERP/attachments
and move the attachments manually:
mv /opt/OpenbravoERP/attachments /opt/EtendoERP/attachments
## Deploy changes to tomcat
./gradlew smartbuild
Info
Special consideration may have to be taken into account if your attachment folder is in a network drive, or a different partition (with or without a symbolic link in place).
Be careful when changing the attachment configuration, and make sure you have a recent backup available.
Customizations to Core
Reapply patches to core if necessary, and compile.
Info
Compilation tasks now can be made with the Gradle Wrapper.
patch -p1 < customPatchToCore.patch
## Apply other patches as needed
./gradlew smartbuild
sudo /etc/init.d/tomcat restart
Apache Configuration
-
If necessary, change apache configuration to use jkmount in the correct context ("openbravo" by default in old installation).
Configuration file should be in/etc/apache2/conf-enabled/openbravo.conf
,/etc/apache2/conf-available/openbravo.conf
or/etc/apache2/sites-available/000-default.conf
//etc/apache2/sites-available/000-default-le-ssl.conf
ReplacejkMount /openbravo* ajp13_worker
byjkMount /etendo* ajp13_worker
-
Change apache configuration to redirect to new context ("openbravo" by default in old installation).
Configuration file should be in/var/www/html/index.html
.
Replace<META HTTP-EQUIV="Refresh" CONTENT="0; URL=openbravo">
by<META HTTP-EQUIV="Refresh" CONTENT="0; URL=etendo">
Warning
Make sure to replace by the context you chose when in the
gradle.properties
file. -
Restart apache:
Activate your instance
- Login as System Administrator and use the Instance Activation window to activate your instance.
- Use Refresh Online
- Enter your instance purpose and your activation key.
Success
Your instance is activated!
Change backup and restore script
-
Make sure that the backup script now obtains its data from the correct
Openbravo.properties
, for example in folder/opt/EtendoERP/
The backup script is usually located in/usr/share/openbravo/backup/backup
. You should change the lines to point to the actualOpenbravo.properties
file. For example:Terminaldb_login=$(awk -F = '/^bbdd.user/ {print $2}' /opt/OpenbravoERP/config/Openbravo.properties)
Should be changed for something like this:
This will vary depending on the path that has been selected for the migration.
Warning
Remember that in the current state
Openbravo.properties
does not change its name. This should not be changed until further notice from the development team. Also, you must not change the Openbravo name anywhere else. Do it only in the paths for the properties file.Info
A dedicated backup tool is in development.
-
The same should be done for
/usr/bin/openbravo-restore
. Given that the scripts are highly hardcoded, you have to change some lines manually.
The database to be dropped should be the Etendo database, but the script will drop the openbravo db. This should be changed to drop the Etendo database.
-
Change:
for:
-
Change the line that creates the database:
for
-
Change the target database on the lines that the pg_restore is done, for example:
for
-
Change the line which erases the tomcat files:
for
-
Change the path of the sources for the new path created for Etendo, for example:
for
Warning
The same warning for the backups applies here. Be careful with what you rename. If you see an error, please ask for support.
Change initial directory on login
Inside ~/.bashrc
you may have a command that lets you log in directly to the /opt/OpenbravoERP
folder. Change it so it points to your new instance folder:
Change server user
You may change the current user from Openbravo to Etendo, if you want. This guide does not cover how to do so.
Remove previous installation
-
Remove Openbravo context from Tomcat folder:
-
Remove Openbravo installation:
-
Remove Openbravo database:
Warning
Make sure above commands are pointing to the correct databases, user and host, and that you have done a backup before executing the command.
Apply 303 Taxes and Tax Report Fixes
This step is only necessary if the following conditions happen in your environment:
- The
org.openbravo.module.aeat303.temporal.taxes.es
,org.openbravo.module.aeat303.temporal.taxparameters.es
,org.openbravo.localization.spain.referencedata.taxes.es
andorg.openbravo.module.aeat303.es
modules are installed and their datasets applied in the ERP - You want to update the
Spain Localization Extensions
bundle to version1.8.0
or higher, otherwise, you want to update the afforementioned modules to these versions:org.openbravo.localization.spain.referencedata.taxes.es
: version1.8.0
or higherorg.openbravo.module.aeat303.es
: version1.14.0
or higher
To solve issues with taxes arising from these modules being migrated from Openbravo to Etendo, refer to the related Known Issue
Apply 390 Taxes and Tax Report Fixes
This step is only necessary if the following conditions happen in your environment:
- The
org.openbravo.module.aeat303.temporal.taxes.es
,org.openbravo.module.aeat303.temporal.taxparameters.es
,org.openbravo.localization.spain.referencedata.taxes.es
andorg.openbravo.module.aeat390.es
modules are installed and their datasets applied in the ERP - You want to update the
Spain Localization Extensions
bundle to version1.8.0
or higher, otherwise, you want to update the afforementioned modules to these versions:org.openbravo.localization.spain.referencedata.taxes.es
: version1.8.0
or higherorg.openbravo.module.aeat390.es
: version3.9.0
or higher
To solve issues with taxes arising from these modules being migrated from Openbravo to Etendo, refer to the related Known Issue
Conclusion
Info
With these steps, you should have successfully migrated your Openbravo data to Etendo either on a Linux system or on a Windows system. If you encounter any problems during the process, please reach out to the Etendo support team for assistance.