importWASConfig.py script

Use the importWASConfig.py script to import WebSphere® Application Server configuration that was exported from the source deployment environment, including data sources, authentication aliases, and Secure Sockets Layer (SSL) settings.
This script imports the customized WebSphere Application Server configuration that was exported from the source deployment environment by using the exportWASConfig.py script. You can import this configuration when you create a new deployment environment. This script imports and re-creates the configuration in the following order:
  • Authentication aliases, JDBC providers, JMS providers, and resource adapters
  • Data sources (which refer to authentication aliases and JDBC providers)
  • Namespace bindings
  • Bus and messaging engines, bus links, bus destinations (which refer to namespace bindings)
  • Connection factories (which refer to authentication aliases, JMS providers, and bus names)
  • JMS queue and topic specifications (which refer to bus names)
  • Activation specifications (which refer to authentication aliases, JMS providers, bus and messaging engine names, and JMS queues)

After you run the importWASConfig.py command, restart the IBM® Business Process Manager environment.

The importWASConfig.py script is run using the AdminTask object of the wsadmin scripting client.

Prerequisites

The following conditions must be met:
  • Run the command in disconnected mode; that is, with the server stopped. Use the -conntype none option.

Location

The script is in install_root/util/migration/scripts. If you installed the new version of the product on a different computer and copied the migration files to the source environment, the script is in remote_migration_utility/util/migration/scripts.

A log file is created in the directory where you run the command. The log file is named importWASConfig_yyyyMMdd_hhmmss.log.

Start the wsadmin scripting client from the profile_root/bin directory.

Syntax

deployment_manager_profile/bin/wsadmin -conntype NONE -lang jython -f importWASConfig.py
[-importAllAuthAliases | -importAuthAlias alias_name |
  -importAllJDBCProviders  | 
  -importAllJMSProviders  |
  -importAllDataSources | -importDataSource jndi_name | 
  -importAllNameSpaceBindings | -importNameSpaceBinding namespace_ID | 
  -importSIBusConfig bus_name | 
  -importAllConnectionFactories  | -importConnectionFactory jndi_name | 
  -importAllQueuesAndTopics  | -importQueueOrTopic jndi_name | 
  -importAllActivationSpecs  | -importActivationSpec jndi_name | 
  -importAllSSLSettings | -importSSLSetting alias_name | 
  -importJavaSecurityFile ]
input_directory

Parameters

-f
Specifies the script file to run.
-importAllAuthAliases
Imports the configuration for all authentication aliases from the source deployment environment.

The configuration for each authentication alias is imported to the target environment. If an authentication alias with that name exists, it is skipped.

-importAuthAlias alias_name
Imports the configuration for the authentication alias with the specified name from the source deployment environment.

The configuration for the authentication alias with the specified name is imported to the target environment, unless an authentication alias with that name exists. If it exists, you are asked if you want to update it.

-importAllJDBCProviders
Imports the configuration for all JDBC providers from the source deployment environment.
-importAllJMSProviders
Imports the configuration for all JMS providers from the source deployment environment.
-importAllDataSources
Imports the configuration for all data sources that were exported from the source deployment environment. If the JNDI name of the data source exists in the target environment, the configuration is updated. Otherwise, a new data source is created and you are prompted for the scope and JDBC provider.
-importDataSource jndi_name
Imports the configuration for the data source with the specified JNDI name from the source deployment environment. You can find the JNDI name in the exportDS.properties file in the input_directory that was created by the exportWASConfig.py command.

If the JNDI name of the data source exists in the target environment, the configuration is updated. Otherwise, a new data source is created and you are prompted for the scope and JDBC provider.

-importAllNameSpaceBindings
Imports the configuration for all namespace bindings that were exported from the source deployment environment.
-importNameSpaceBinding namespace_ID
Imports the configuration for the namespace binding with the specified ID from the source deployment environment.
-importSIBusConfig bus_name
Imports the bus and messaging engine configuration, including the bus link and bus destination, for a specific bus that was exported from the source deployment environment. The general properties of the following objects are imported:
  • Bus
  • Bus members
  • Messagine engines
  • Foreign buses
  • Destinations
  • Security
Additional properties and related items are not imported.
-importAllConnectionFactories
Imports the configuration for all connection factories that were exported from the source deployment environment.
-importConnectionFactory jndi_name
Imports the configuration for the connection factory with the specified JDNI name from the source deployment environment.
-importAllQueuesAndTopics
Imports the configuration for all JMS queue and topic specifications that were exported from the source deployment environment.
Important: The following values are not imported:
  • forwardRoutingPath
  • reverseRoutingPath
If you set values for these properties in the source environment, you must reset them manually after migration.
-importQueueOrTopic jndi_name
Imports the configuration for the JMS queue or topic specification with the specified JDNI name from the source deployment environment. The values for forwardRoutingPath and reverseRoutingPath are not imported.
-importAllActivationSpecs
Imports the configuration for all activation specifications that were exported from the source deployment environment.
-importActivationSpec jndi_name
Imports the configuration for the activation specification with the specified JDNI name from the source deployment environment.
-importAllSSLSettings
Imports all SSL configuration settings from the source deployment environment. This parameter imports only the SSL configuration; related truststore and keystore configuration are not imported. For each SSL configuration, the alias name must exist in the exportSSL.properties file in the input_directory that was created by the exportWASConfig.py command.
For example, exportSSL.properties might contain the following lines:
#Exported SLL Setting
CellDefaultSSLSettings.ObjectFileName=CellDefaultSSLSettings.obj
CellDefaultSSLSettings.ScopeName=(cell):bxv9v447Cell01
#Exported SLL Setting
NodeDefaultSSLSettings.ObjectFileName=NodeDefaultSSLSettings.obj
NodeDefaultSSLSettings.ScopeName=(cell):bxv9v447Cell01:(node):bxv9v447Node01
The part in bold is the SSL configuration alias. If those aliases do not exist in the target environment, you must create them before you can import the settings from the source environment.
-importSSLSetting alias_name
Imports the SSL setting with the specified alias from the source deployment environment. This parameter imports only the SSL configuration; related truststore and keystore configuration are not imported. If the SSL configuration alias does not exist in the target environment, you must create it before you can import the settings from the source environment.

The SSL setting with the specified alias is imported to the target environment.

-importJavaSecurityFile
Imports the exported Java security file from source environment into the target environment. The file is imported to target_install_root/java/jre/lib/security/java.security
input_directory
Contains the configuration that was exported from the source deployment environment by using the exportWASConfig.py command.

Examples

The following example shows how to import the configuration for all authentication aliases from the source deployment environment.
wsadmin -conntype NONE -f /tmp/importWASConfig.py -importAllAuthAliases  /tmp/exportedAuthAliases
The following example shows how to import the configuration for the authentication alias with the specified name from the source deployment environment.
wsadmin -conntype NONE -f /tmp/importWASConfig.py -importAuthAlias tmp/SCA_Auth_Alias /tmp/exportedAuthAliases
The following example shows how to import the configuration for all data sources.
wsadmin -conntype NONE -f /tmp/importWASConfig.py -importAllDataSources /tmp/exportedDataSources
The following example shows how to import the configuration for the data source with the specified JNDI name.
wsadmin -conntype NONE -f /tmp/importWASConfig.py -importDataSource jdbc/WPSDB /tmp/exportedDataSources
The following example shows how to import the configuration for all JDBC providers.
wsadmin -conntype NONE -f /tmp/importWASConfig.py -importAllJDBCProviders /tmp/exportedJDBCProviders
The following example shows how to import all SSL settings from the source deployment environment.
wsadmin -conntype NONE -f /tmp/importWASConfig.py -importAllSSLSettings /tmp/exportedSSLSettings
The following example shows how to import the SSL setting with the specified configuration alias from the source deployment environment.
wsadmin -conntype NONE -f /tmp/importWASConfig.py -importSSLSetting CellDefaultSSLSettings /tmp/exportedSSLSettings
The following example shows how to import the Java security file into the target deployment environment.
wsadmin -conntype NONE -f /tmp/importWASConfig.py -importJavaSecurityFile /tmp/exportedJavaSecurityFile