Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1. Stop all running App Manager server instances.
  2. Make sure that you have backed up all the databases, mobile binaries and synapse configs as instructed in step 1 of the previous section.
  3. Download and extract the WSO2 App Manager migration client resource archive.
  4. Unzip
  5. Login to database server and execute SQL queries given in  wso2-appmgt-migration-client-1.2.x/migration-scripts/dbscripts/constraints against the App Manager datasource. Please select the relevant sql script according to your database type.

    ie :  If My SQL/h2, use mysql-drop-fk.sql 

    If Ms SQL, use mssql-drop-fk.sql

    Please note that you need to manually execute the first select query to get the constraint name in ‘APM_API_CONSUMER_APPS’ table and use the resulted constraint name in following Alter query

    Code Block

    (This particular action is taken due to a primary key alteration done to IDN_OAUTH_CONSUMER_APPS table, during Identity Server migration. IDN_OAUTH_CONSUMER_APPS table's primary key has been used as a foreign key in APM_API_CONSUMER_APPS so that we need to drop the foreign key temporarily)

  6. Copy the relevant database drivers to the <APPM_1.2.0_HOME>/repository/components/lib folder.
  7. Download the WSO2 Identity Server migration client. This is required to migrate the Identity and User Store Database schemas that is used by App Manager. Unzip the downloaded file to the local file system where the wso2is-5.1.0-migration directory is created and do the following:
    1. Copy the wso2is-5.1.0-migration/dbscripts/migration­5.0.0_to_5.1.0 directory to the <APPM_1.2.0_HOME>/dbscripts directory.

    2. Copy the wso2is-5.1.0-migration/dbscripts/identity/migration­5.0.0SP1_to_5.1.0 directory and the wso2is-5.1.0-migration/dbscripts/identity/migration­5.0.0_to_5.0.0SP1 directory to the <APPM_1.2.0_HOME>/dbscripts/identity directory.

    3. Copy the wso2is-5.1.0-migration/dropins/­5.1.0.jar file to the <APPM_1.2.0_HOME>/repository/components/dropins directory.  
  8. Before you run the migration client as given in the step below, open the <APPM_1.2.0_HOME>/repository/conf/datasources/master-datasources.xml file and set the <username> and <password> elements of the AM_DB JNDI table to that of a user who has permissions to alter tables in the database.

    For example,

    Code Block
            <definition type="RDBMS">

    After you are done running the migration client, you can switch these credentials back to a user with lesser privileges.

  9. Start App Manager 1.2.0 with the -Dmigrate -Dcomponent=identity command line option to carry out the complete Identity and User Store DB migration. Alternatively, you can run it step by step by starting the server with the command line options given below in the following order.

    • -DmigrateIdentityDB -Dcomponent=identity

    • -DmigrateUMDB -Dcomponent=identity

    • -DmigrateIdentityData -Dcomponent=identity

    • -DmigrateIdentityDBFinalize -Dcomponent=identity

    • -DmigrateUMData -Dcomponent=identity

    After executing the Identity Server migration client database, registry resources are migrated.
  10. Stop the server after identity migration.

  11. Download WSO2-CARBON-PATCH-4.4.0-0686 and apply it to all the App Manager nodes by following the instructions given in the README.txt file inside.
  12. If you are using any of the embedded h2 databases for WSO2AM_DB, WSO2UM_DB, WSO2REG_DB, JAGH2, or WSO2_SOCIAL_DB, please move those embedded databases into APPM 1.2.0. For that, go to <APPM_1.1.0_HOME>/repository/database folder and move the relevant database into <APPM_1.2.0_HOME>/repository/database folder (You can open to <APPM_1.1.0_HOME>/repository/conf/datasources/master-datasources.xml and get database configuration to figure out which databases are configured with embedded h2 database server)
  13. Copy wso2-appmgt-migration-client-1.2.x/migration-scripts/dbscripts/appmgt/1.1.0-1.2.0-migration directory to the <APPM_1.2.0_HOME>/dbcripts/appmgt folder.

  14. Copy wso2-appmgt-migration-client-1.2.x/org.wso2.carbon.appmgt.migrate.client-1.2.x.jar file to the <APPM_1.2.0_HOME>/repository/components/dropins folder.

  15. Start App Manager 1.2.0 with the following command line options to migrate the database, registry and the file system all together or separately based on each profile.

    To migrate the database, registry and file system all together. This migrates the webapp related registry resources, databases and synapse configurations. Ideally, this migration command option is required for a standalone pack.-Dmigrate=true  -DmigrateToVersion=1.2.0./ -Dmigrate=true  -DmigrateToVersion=1.2.0

    To migrate the database only. This migrates the WSO2AM_DB.

    titleDistributed setup

    In a distributed setup, perform this action in one of the Store/Publisher/Gateway nodes where the WSO2AM_DB is configured



    ./ -DmigrateDB=true


    To migrate the registry only. This migrates the registry resources only.

    titleDistributed setup

    In a distributed setup, perform this action in one of the Store/Publisher nodes where the registry is shared



    ./ -DmigrateReg=true


    To migrate the file system only. This migrates the Webapp API configuration files.

    titleDistributed setup

    In a distributed setup, perform this action in one of the Gateway nodes where the synapse configuration files are available.



    ./ -DmigrateFS=true


    To migrate active tenants only.

    titleMigrate active tenants only

    Optional: If you have any disabled/inactive tenants in your previous version of WSO2 App Manager that you do not want to bring forward to the next version, you can use DmigrateActiveTenantsOnly flag to do a complete or registry or file system based migration for active tenants only.


    -DmigrateToVersion=1.2.0 -DmigrateActiveTenantsOnly

    ./ -Dmigrate=true -DmigrateToVersion=1.2.0 -DmigrateActiveTenantsOnly
  16. Do the following to re-index the artifacts in the registry:

    1. Rename the <lastAccessTimeLocation> element in the <APPM_1.2.0_HOME>/repository/conf/registry.xml file. If you use a clustered/distributed App Manager setup, change the file in the Publisher node. 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.

    2. Shut down the App Manager 1.2.0 server, back up and delete the <APPM_1.2.0_HOME>/solr directory.

  17. Restart the server.

  18. Login to admin console as the admin user and navigate to /_system/config/repository/components/org.wso2.carbon.registry/queries using registry browser. Then delete all the queries listed under "queries" collection (allTags,latest-apis,resource-by-tag,tag-summary and tagsByMediaTypeAndLifecycle). Likewise login to each tenant space and delete all the tag queries.


    If you are using gateway applications with WSO2 Identity Provider(WSO2 IS), please continue with the below steps. If you are not using gateway applications or if you are having an external Identity Server as the Identity provider, please ignore following steps on Service Provider migration.

  19. Login to carbon console of Identity Provider Node (WSO2 Identity Server)

  20. Go to Identity > Service Providers in the left menu and select service provider list

  21. Now you can see the list of available service providers

  22. Select the service provider that you need to update and click 'Edit' button. (The service provider name is composed as {webapplication name}-{webapplication-version}, so that the corresponding service provider of a given webapp can be easily identified by the name)

  23. You will see the Service provider detail page. Then click on 'Inbound Authentication Configuration'

  24. Select on 'SAML2 Web SSO Configuration' under the 'Inbound Authentication Configuration'
  25. Click on 'Edit' button
  26. In App Manager 1.2.0, a postfix can be appended to Assertion Consumer URL. The postfix configuration is there in <APPM_1.2.0_HOME>/repository/conf/app-manager.xml. Under <SSOConfiguration>, you will find following configuration, where the postfix can be configured. 


    Code Block
            <!-- Postfix of the ACS URL -->