Page History
The following information describes how to upgrade your API Manager server from the previous release, which is APIM 1.8.0. To upgrade from a version older than 1.8.0, start from the doc that was released immediately after your current release and upgrade incrementally.
Table of Contents | ||||
---|---|---|---|---|
|
Migrating the configurations
In this section, you move all existing API Manager configurations from the current environment to the new one.
Back up the databases in your API Manager instances and synapse configs in of all the tenants, including the super tenant. You find the synapse configs in
<APIM_1.8.0_HOME>/repository/deployment/server/synapse-config/default.
Open the
<APIM_1.9.0_HOME>/repository/conf/datasources/master-datasources.xml
file and provide the datasource configurations for the following databases. You can copy the configurations from the same file in the API Manager 1.8.0 instance.- User Store
- Registry database
- API Manager Databases
Edit the registry configurations in the
<APIM_1.9.0_HOME>/repository/config/registry.xml
and the user database in the<APIM_1.9.0_HOME>/repository/conf/user-mgt.xml
file.Move all your synapse configurations by copying and replacing
<APIM_1.8.0_HOME>/repository/deployment/server/synapse-config/default
directory to<APIM_1.9.0_HOME>/repository/deployment/server/synapse-config/default
directory.Warning NOTE: Do not replace the
_TokenAPI_.xml
,_RevokeAPI_.xml
and_AuthorizeAPI_.xml
files in the/default/api
sub directory unless you use a custom token endpoint. They are application-specific APIs.
Upgrading the API Manager from 1.8.0 to 1.9.0
If you are not using the MySQL database with the API Manager, change the query inside
<APIM_1.9.0_HOME>/migration-scripts/18-19-migration/drop-fk.sql
according to your database type. The scripts for each database type are given in the table below:Database type Script MySQL No changes are required as the default drop-fk.sql
file already contains the scripts for MySQL.H2 SELECT DISTINCT constraint_name FROM information_schema.constraints WHERE table_name = 'AM_APP_KEY_DOMAIN_MAPPING';
ALTER TABLE AM_APP_KEY_DOMAIN_MAPPING DROP CONSTRAINT <temp_key_name>;
Oracle SELECT DISTINCT constraint_name FROM user_cons_columns WHERE table_name = 'AM_APP_KEY_DOMAIN_MAPPING';
ALTER TABLE AM_APP_KEY_DOMAIN_MAPPING DROP CONSTRAINT <temp_key_name>;
MS SQL Server SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE WHERE TABLE_NAME = 'AM_APP_KEY_DOMAIN_MAPPING' AND COLUMN_NAME='CONSUMER_KEY';
ALTER TABLE AM_APP_KEY_DOMAIN_MAPPING DROP CONSTRAINT <temp_key_name>;
Postgresql SELECT CONSTRAINT_NAME FROM information_schema.constraint_table_usage WHERE TABLE_NAME = 'AM_APP_KEY_DOMAIN_MAPPING';
ALTER TABLE AM_APP_KEY_DOMAIN_MAPPING DROP CONSTRAINT <temp_key_name>;Start the API Manager 1.9.0 with the following command options to migrate the database, registry and the file system together or separately.
To migrate the database, registry and file system together Dmigrate=1.9 To migrate the database only DmigrateDB=1.9 To migrate the registry only DmigrateReg=1.9 To migrate the file system only DmigrateFS=1.9 Tip Tip: You can migrate all the resources together with the Dmigrate=1.9 command. If you need to perform single resource migrations, you can use the other commands separately. If you already executed
-Dmigrate=1.9
once, you do not need to execute the rest.v
To re-index the artifacts in the registry, perform the two steps given below.
a) Rename the lastAccessTimeLocation in the
<APIM_1.9.0_HOME>
/repository/conf/registry.xml
file. For example, change the/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime
registry path to/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1.
b) Shut down AM 1.9.0, backup and delete the
<APIM_1.9.0_HOME>
/repository/conf/solr
directory and restart the server.
...