Difference between revisions of "Migration"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
m (Migration from older ADempiere versions)
m (Migration from older ADempiere versions)
Line 26: Line 26:
  
 
=== Migration from older ADempiere versions ===
 
=== Migration from older ADempiere versions ===
 +
 +
'''!IMPORTANT!'''
 +
 
'''If you are migrating from older ADempiere versions, than the previous to the last, you must migrate from version to version of ADempiere.'''
 
'''If you are migrating from older ADempiere versions, than the previous to the last, you must migrate from version to version of ADempiere.'''
  

Revision as of 23:45, 15 September 2008

Migration between Versions

Introduction

The migration into ADempiere versions is FREE.

There are scripts to migrate from the previous versions to the last (latest) version released. When a new ADempiere version is released, all the changes done to the databases are included into the scripts that are released with this version too.

So you only need apply those scripts to your database and then you will have the last ADempiere version, without fees. Of course, you need install the new ADempiere release too.

Where are the scripts?

All scripts to migrate the database can be found into trunk/migration of SF.

How you apply those scripts?

The scripts are SQL files, so they must be applied with some SQL tool (i.e. you can use dbvisualizer, Toad, sqlplus or sqldeveloper to Oracle, or you can use pgAdmin if your database is PostgreSQL).

Please mark the names for all scripts to begin with a number, such as 001_xxxx.SQL, 002_xxx.SQL. So it is very important to execute all the scripts in the order indicated by the number. You must apply ALL those scripts too.

If you see a script with suffix _oracle (E.G. 001_xxxx_oracle.SQL) this is because it is Oracle specific, and should not to be run on a PostgreSQL installation. Similarly if you see a script with suffix _psql (E.G. 001_xxxx_psql.SQL) this is PostgreSQL specific, and should not to be run on an Oracle installation. If you see a script without any suffix it can be run on either an Oracle or a PostgreSQL installation.

NOTE From 3.15 the PostgreSQL files are in a subdirectory named postgresql and the Oracle files are in the main directory of the migration scripts (ie migration/314-315/postgresql and migration/314-315)

Please, you must assure that each script is executed Ok, without errors.

Migration from older ADempiere versions

!IMPORTANT!

If you are migrating from older ADempiere versions, than the previous to the last, you must migrate from version to version of ADempiere.

An Example:

Your current ADempiere version is 3.1.1 and you want to migrate to the last ADempiere version, we suppose 3.1.4.
So, you must migrate:
  • From ADempiere 3.1.1 -> 3.1.2
  • From ADempiere 3.1.2 -> 3.1.3
  • From ADempiere 3.1.3 -> 3.1.4

You can also skip all these intermediary steps if you make your own script. To do that refer to the note below.

Migration from Compiere to ADempiere

To migrate from Compiere to ADempiere, first migrate from version to version of Compiere, until your reach Compiere 2.5.3d.

The migration script from version 2.5.3a to version 2.5.3d of Compiere was developed by Karsten-Thiemann, assisted by Carlos Ruiz and tested by Colin Rooney.

You can find these scripts in the same place as the ADempiere version migration scripts: trunk/migration on SourceForge.

Once you have migrated your current Compiere database to version 2.5.3d (unpublished), you are at ADempiere 3.1.1. You can then continue the migration steps from there to the next ADempiere version.

Migration: HowTo

Basically you will need to do the following steps to migrate:

  • Backup Database: it is highly recommendable that you previously make a backup of your current database. (Please, do that before starting the migration!). To start the backup, run the RUN_DBExport.[bat|sh] script (located under the ADEMPIERE_HOME\utils folder). The script creates under ADEMPIERE_HOME\data the files ExpDat.dmp, ExpDat.jar and ExpDat.log. The file containing the actual backup is ExpDat.dmp, which you can recogize because of its size. Remember to log in as oracle user to accomplish this task.
  • Apply ALL corresponding SQL scripts from trunk/migration to migrate your database. Please, remember to do it in the right order. The scripts to be run depend on your actual version. If you fail or forget to run the SQL scripts, you will get a message at login stating the mismatch between the version of Adempiere and database and Adempiere will refuse to start.
  • Backup your current ADempiere installation: rename your current ADempiere folder (i.e. from Adempiere to _Adempiere).
  • Extract the new Adempiere version to your former Adempiere folder (Adempiere).
  • Copy the AdempiereEnv.properties and Adempiere.properties from your old installation folder (the renamed _Adempiere) into the new Adempiere folder.
  • Make sure that the Application Server is not running and database engine and listener (for oracle) are up. You can stop the Application Server by running RUN_Server2Stop.[bat|sh] in ADEMPIERE_HOME\utils. If the Application Server runs during the next step, the script could tell you that a port is busy. You should as well close all applications that clucth the ports (mostly 1099 for jnp, 443 for SSL, 1521 for database).
  • Run the RUN_Setup.[bat|sh] script. It should give you the setup screen with all correct settings (derived from your old *.properties). First press Test. If the configuration entries get checked, meaning that they work, select Save. After some time, depending on the machine you are installing, the installation window closes.
  • Start the Application Server by running RUN_Server2.[bat|sh] in ADEMPIERE_HOME\utils.
  • Start ADempiere and login as System Administrator (SuperUser, System -> role System Administrator).
  • Run Sequence Check.
  • If you use additional languages: login with the standard English language as System Administrator, open Language (under General Rules -> System Rules -> Language), select your language and push Language Maintenance button. Choose Add Missing Translation and run the process.
  • Exit from ADempiere.
  • Start ADempiere again.

That is all!

How to build a migration script

  • Karsten-Thiemann also contributed within his migration script for us to get the difference between two Oracle database versions. It is not limited to just ADempiere/Compiere. For example you should be able to get the difference between a Compiere 252d and the latest ADempiere 314. To do that, please refer to trunk/migration. You can also follow the instructions in Readme.txt file.
  • Now things become more automated when Generating Migration Scripts.

Related Links

Tutorial Movies