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.

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.

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

Syntax

deployment_manager_profile/bin/wsadmin -conntype NONE -lang jython -f importWASConfig.py
-importAllDataSources | -importDataSource datasource_jndi_name | 
-importAllAuthAliases | -importAuthAlias alias_name |
-importAllSSLSettings | -importSSLSetting alias_name | 
-importJavaSecurityFile 
input_directory

Parameters

-f
Specifies the script file to run.
-importAllDataSources
Imports 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 datasource_jndi_name
Imports 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.

-importAllAuthAliases
Imports all authentication aliases from the source deployment environment. Before you can import the authentication aliases, you must edit the .obj file in the input_directory that was created by the exportWASConfig.py command. Modify the value of the password property to the correct value. It is set to ****** by default.

All authentication aliases are imported to the target environment. If an authentication alias with that name exists, it is skipped.

-importAuthAlias alias_name
Imports the authentication alias with the specified name from the source deployment environment. Before you can import the authentication alias, you must edit the .obj file in the input_directory that was created by the exportWASConfig.py command.

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.

-importAllSSLSettings
Imports all SSL configuration settings from the source deployment environment. 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. 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 all data sources.
wsadmin -conntype NONE -f /tmp/importWASConfig.py -importAllDataSources /tmp/exportedDataSources
The following example shows how to import 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 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 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 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