This document describes how to migrate the database from Intershop Order Management version 2.1.0 to version 2.1.x.
The guide mainly targets technical services e.g. administrators and consultants and developers.
Note
No Migration of System
Please note that there is currrently no migration of the system itself. A new installation is required using the approriate Guide - Intershop Order Management 2.1 - Installation and the noted changes to IOM version 2.1.x.
The installation of IOM version 2.1.x is required. Please see Guide - Setup Intershop Order Management 2.1.
Knowledge on following documents are required
Wording | Description |
---|---|
IOM | The abbreviation for Intershop Order Management |
OMS | The abbreviation for Order Management System, the technical name of IOM |
SQL | Structured Query Language |
The release package contains all scripts to migrate the database.
Ensure you are familiar with the IOM properties and variables that are delivered as part of release package.
Refer section 3 Definition of Properties of Guide - Setup Intershop Order Management 2.1 - at least the following ones:
Reuse the properties of cluster, deployment, and installation from 2.1.0 installation as much as possible. Hence, only specific contents are extracted from the release package on backend server.
# after placing the package in $OMS_HOME in backend server # as $OMS_USER # extract for database migration tar -xvf IOM-2.1.X.X.tgz postgres/migrations
This sub-section explains the steps involved during data migration.
Note
Database Backup on Errors
The only way to roll back the database migration in case of an error is to replace the database with a backup.
It is thus essential to first test the migration against a recent copy of the database before running it against the live data.
Execute the script dbmigrate.sh located in $OMS_HOME/bin.
# as $OMS_USER cd $OMS_HOME/bin # mind the empty space after the first dot . ./set_env.sh
This performs the required SQL migration scripts located within the folder $OMS_HOME/postgres/migrations.
# as $OMS_USER # set variables IS_OMS_DB_HOST=<value of your test database server's IP address> # Example: 10.10.0.11 IS_OMS_DB_PORT=<value of your test database server's port> # Example: 5432 IS_OMS_DB_USER=<value of your test database user> # Example: oms_user IS_OMS_DB_NAME=<value of your test database name> # Example: oms_db # calling migration script with parameters ./dbmigrate.sh -h $IS_OMS_DB_HOST -p $IS_OMS_DB_PORT -U $IS_OMS_DB_USER -d $IS_OMS_DB_NAME 2>&1 | tee dbmigrate.test.out
Abort on connect error
The script will abort immediately with a message if it cannot connect to the database, e.g., due to some missing entry within the postgres ph_hba.conf file.
When the script runs without any error, the last line of the output will be success.
... ... next: /cygdrive/d/SVN/OMS/trunk/postgres/migrations/2.1.X.X/migrate_to_2.1.1.0_006.sql 0 next: /cygdrive/d/SVN/OMS/trunk/postgres/migrations/2.1.X.X/migrate_to_2.1.1.0_007.sql 0 next: /cygdrive/d/SVN/OMS/trunk/postgres/migrations/2.1.X.X/migrate_to_2.1.1.0_008.sql 0 success
Errors will be displayed in the console output and logged in the dbmigrate.test.out file. The postgres log file may contain additional information.
If any errors occurs, they must be analyzed and possibly fixed prior to the execution of dbmigrate.sh against the live system.
WARNING
The following operation must not be performed until all IOM application server instances are stopped!
Stop all server instances.
# as root user systemctl stop <wildfly-service-name>
Set environment variables.
By default, dbmigrate uses the connection parameters from environment variables which are set by set_env.sh.
# as $OMS_USER cd $OMS_HOME/bin # mind the empty space after the first dot . ./set_env.sh
Execute the database migration.
# as $OMS_USER ./dbmigrate.sh 2>&1 | tee dbmigrate.log.out
Errors will be displayed in the console output as well as logged in the dbmigrate.log.out. The postgres log file may contain additional information.
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.