exportWASConfig.py script

Use the exportWASConfig.py script to export WebSphere® Application Server configuration, in addition to the configuration exported by the BPMConfig –export or BPMConfig –migrate command.
This script exports customized WebSphere Application Server configuration such as data sources, authentication aliases, and Secure Sockets Layer (SSL) settings. You can run the importWASConfig.py script to import this additional configuration information when you create a new deployment environment.

The exportWASConfig.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 exportWASConfig.py
-exportAllDataSources | -exportDataSource datasource_jndi_name | 
-exportAllAuthAliases | -exportAuthAlias alias_name |
-exportSSLSettings | -exportJavaSecurityFile | -listDataSources  | -listAuthAliases
output_directory
[-cell cell_name]
[-node node_name -server server_name] [-cluster cluster_name]

Parameters

-exportAllDataSources
Exports all data sources from the source deployment environment in the specified scope. You must specify the cell name for this parameter. Optionally, specify the node and server name, or the cluster name.

Each data source is exported to output_directory/datasource_id.obj. A summary file output_directory/exportDS.properties is also created.

-exportDataSource datasource_jndi_name
Exports the data source with the specified JNDI name from the source deployment environment in the specified scope. You must specify the JNDI name and the cell name for this parameter. Optionally, specify the node and server name, or the cluster name.

The data source with the specified JNDI name is exported to output_directory/datasource_id.obj. A summary file output_directory/exportDS.properties is also created.

-exportAllAuthAliases
Exports all authentication aliases from the source deployment environment.

Each authentication alias is exported to output_directory/auth_alias_id.obj. A summary file output_directory/exportAlias.properties is also created.

-exportAuthAlias alias_name
Exports the authentication alias with the specified name from the source deployment environment. You must specify the authentication alias name for this parameter.

The authentication alias with the specified name is exported to output_directory/auth_alias_id.obj. A summary file output_directory/exportAlias.properties is also created.

-exportSSLSettings
Exports all SSL settings from the source deployment environment.

Each SSL setting is exported to output_directory/SSL_Alias_Name.obj. A summary file output_directory/exportSSL.properties is also created.

-exportJavaSecurityFile
Exports the Java security file source_install_root/java/jre/lib/security/java.security from the source deployment environment.
-listDataSources
Lists all the data sources in the source deployment environment.
-listAuthenticationAliases
Lists all the authentication aliases in the source deployment environment.

Examples

The following example shows how to export all data sources from the application cluster of cell 1.
wsadmin -conntype NONE -f /tmp/exportWASConfig.py -exportAllDataSources /tmp/exportedDataSources -cell Cell01 -cluster AppCluster
The following example shows how to export the data source with the specified JNDI name from cell 1.
wsadmin -conntype NONE -f /tmp/exportWASConfig.py -exportDataSource /tmp/exportedDataSources jdbc/WPSDB -cell Cell01
The following example shows how to export all authentication aliases from the source deployment environment.
wsadmin -conntype NONE -f /tmp/exportWASConfig.py -exportAllAuthAliases /tmp/exportedAuthAliases
The following example shows how to export the authentication alias with the specified name from the source deployment environment.
wsadmin -conntype NONE -f /tmp/exportWASConfig.py -exportAuthAlias SCA_Auth_Alias /tmp/exportedAuthAliases
The following example shows how to export all SSL settings from the source deployment environment.
wsadmin -conntype NONE -f /tmp/exportWASConfig.py -exportSSLSettings /tmp/exportedSSLSettings
The following example shows how to export the Java security file from the source environment.
wsadmin -conntype NONE -f exportWASConfig.py -exportJavaSecurityFile /tmp/exportedJavaSecurityFile
The following example shows how to list all the data sources in the source deployment environment.
wsadmin -conntype NONE -f exportWASConfig.py -listDataSources 
The following example shows how to list all the authentication aliases from the source deployment environment.
wsadmin -conntype NONE -f exportWASConfig.py -listAuthAliases