WASPostUpgrade command

 

+

Search Tips   |   Advanced Search

 

The WASPostUpgrade command is a migration tool for adding the configuration and applications of a previous version or release to a Version 6.0 WAS node. The configuration includes migrated applications. The tool adds all migrated applications into the install_root/installedApps directory for the V6 installation. The tool retrieves the saved configuration that was created by the WASPreUpgrade tool from the backupDirectory that you specify.

 

Location of command file

The command file is located and should be run in the WAS60_install_root/bin directory. The command file is a script named WASPostUpgrade.sh for Linux-based platforms or WASPostUpgrade.bat for Windows platforms.

 

WASPostUpgrade.sh command syntax for Linux-based platforms

The command syntax is as follows

    WASPostUpgrade.sh backupDirectory
                     [-oldProfile profile]
                     [-profileName profile]
                     [-import xmi_data_file]
                     [-scriptCompatibility true | false]
                     [-portBlock port_starting_number]
                     [-backupConfig true | false]
                     [-replacePorts true | false]
                     [-substitute "key1=value1[;key2=value2;[...]]"]
                     [-instance instanceName -hostName hostname]
                     [-includeApps true | false]
                     [-traceString trace_spec [-traceFile file_name]]
                     [-scriptCompatibility true | false ]
                     [-connectionTimeout <TimeoutInMinutes>]

The first argument is required.

 

WASPostUpgrade.bat command syntax for Windows platforms

WASPostUpgrade backupDirectory
                 [-oldProfile profile]
                 [-profileName profile]
                 [-import xmi_data_file]
                 [-scriptCompatibility true | false]
                 [-portBlock port_starting_number]
                 [-backupConfig true | false]
                 [-replacePorts true | false]
                 [-substitute "key1=value1[;key2=value2;[...]]"]
                 [-instance instance_name -hostName host_name]
                 [-includeApps true | false]
                 [-traceString trace_spec [-traceFile file_name]]
                 [-scriptCompatibility true | false ]
                 [-connectionTimeout < timeoutInMinutes>]

The first argument is required.

 

Parameters

Supported arguments include:

backupDirectory

Required parameter of the directory in which the WASPreUpgrade tool stores the saved configuration and files. The WASPostUpgrade tool reads the configuration and files stored in this directory. The WASPreUpgrade tool creates this directory if it does not already exist.

-oldProfile profile

An optional parameter for migrating instances from previous WAS versions or profiles. The instance or profile must already exist in the migration backup directory before executing this command. In V5.x, unique instance names were defined by the concatenation of -instanceName and -hostName; this concatenation forms the profile that we need to use with the -oldprofile parameter. In V5.x, this concatenation is stored in the install_root\properties directory, in a file called wsinstance.config.

-profileName profile

An optional parameter for migrating to profiles in V6. You must have already created this profile before calling WASPostUpgrade. If -profileName is not specified, the default profile will be used. If no default profile is found, the system will report an error.

-import xmi_data_file

The name of the WAS Advanced Single Server Edition or Advanced Edition, V4.0 XML Metadata Interchange (XMI) configuration file to process. This parameter is optional because the program uses the config\server-cfg.xml file by default.

When migrating a configuration that uses anything other than the default server-cfg.xml file name, use the -import option along with the path to the non-default XMI configuration file in the directory created by the WASPreUpgrade tool.

-portBlock port_starting_number

An optional parameter used to specify the starting value to use when creating ports.

-backupConfig true | false

An optional parameter used to back up the existing configuration of the current profile before adding the saved configuration from the earlier release to the current instance. The default is true, to use the backupConfig command to save a copy of the current configuration into the profile/temp directory. Use the restoreConfig command to restore that configuration as required.

-replacePorts true | false

An optional parameter used to define how to migrate virtual host and server transport ports. The default for migrations from V4.0.x is false (do not replace default port definitions); the default for migrations from V5.x is true (do replace default port definitions). Migrating adds configuration data from the previous version to the existing data in the V6.0 configuration. In some cases existing port definitions from the earlier release were carefully set to avoid port conflicts with other products. In such cases, it is likely that you would want to migrate the settings into V6.0. Use the -replacePorts parameter to totally replace settings in the V6.0 environment with the settings from the previous version. Select true to replace all virtual host alias port settings during migration. If migrating from V5.0.x or later, transport settings in existing servers are replaced by the settings from the previous version.

-substitute key1=value1;key2=value2;...

Optional argument passed to the XMLConfig tool. Specify values for security variables to substitute (for example, -substitute "NODE_NAME=admin_node;APP_SERVER=default_server").

In the input XML data file, each key appears as $key$ for substitution. In the above example, this argument substitutes any occurrence of $NODE_NAME$ with admin_node and $APP_SERVER$ with default_server in the input XML file.

If the substitution string contains semicolons, use $semiColon$ to distinguish the string from the ";" delimiter. On Linux platforms, add an escape character to each dollar sign ($) within the substitution string (for example, \$semiColon\$).

This parameter is applicable for configurations saved from Advanced Edition, Version 4.0.x.

-instance instance_name -hostName host_name

Optional parameters used for migrating instances from previous versions of WebSphere Application Server. An instance of instance_name host_name must already exist in the current WAS configuration before this command is executed.

-includeApps true | false

An optional parameter used to specify whether to migrate only the old configuration, or to include user enterprise applications as part of the migration. The default is true. WAS system applications will migrate regardless of the value set by this parameter.

-traceString trace_spec -traceFile file_name

Optional parameters to gather trace information for IBM Service personnel. Specify a trace specification of "*=all=enabled" (with quotation marks) to gather all trace information.

-scriptCompatibility true | false

An optional parameter used to specify whether migration should create Transport and ProcessDef definitions in the configuration instead of Channels and ProcessDefs. Use this parameter if you have existing wsadmin scripts or programs that create or modify Transport or ProcessDef defintions. The default is true.

-connectionTimeout timeoutInMinutes

This is an optional parameter to be used if a SOAP/RMI timeout occurs when performing a migration of a managed node. This parameter is specified in minutes (the default value is 10). It is possible to run into a SOAP/RMI timeout issue when migrating a very large or very complex configuration; if this happens, you should increase the amount of time before a SOAP/RMI connection timeout occurs and run migration again.

 

Logging

The WASPostUpgrade tool displays status to the screen while running. This tool also saves a more extensive set of logging information in the logs directory. We can view the WASPostUpgrade.log file with a text editor.

The WASPostUpgrade tool displays status to the screen while running. This tool also saves a more extensive set of logging information in the logs directory. We can view the WASPostUpgrade.log file with a text editor.

 

Migrate from V4.0.x Advanced Edition

The following example specifies a backup directory named backupDirectory, and identifies the root of the existing installation as d:\WebSphere\AppServer.

WASPreUpgrade backupDirectory d:\WebSphere\AppServer yourNodeName

 

Migrate from V4.0.x Advanced Single Server Edition with multiple backup directories

This example shows how to migrate separate configuration files incrementally from a single node with a single installation of WAS Advanced Single Server Edition. To migrate more than one configuration file, run the WASPreUpgrade tool multiple times to multiple backup directories because not all of the applications are in the same installedApps directory. For this reason, using a single backup directory for all the runs of the WASPreUpgrade tool is not recommended. Use a separate backup directory for each run. The intent of this example is to show how to migrate a single node with multiple configuration files.

  1. Run the following WASPreUpgrade commands to migrate applications A, B, C, D, and E, which reside in three separate application directories. Server assumptions include:

    • The Application Server uses the server-cfg.xml default configuration file, as well as the myServer1-cfg.xml and the OldServer-cfg.xml files.

    > WASPreUpgrade "C:\WAS4ABBACKUP"  G:\WebSphere\AppServer
    > WASPreUpgrade "C:\WAS4CDBACKUP"  G:\WebSphere\AppServer
          -import  G:\WebSphere\AppServer\config\myServer1-cfg.xml
    > WASPreUpgrade "C:\WAS4EBACKUP"  G:\WebSphere\AppServer
          -import G:\WebSphere\AppServer\config\OldServer-cfg.xml
    
    

  2. Run the following WASPostUpgrade commands to restore the applications and configurations to the V6 Application Server

    > WASPostUpgrade  C:\WAS4ABBACKUP
    > WASPostUpgrade "C:\WAS4CDBACKUP" -import "C:\WAS4CDBACKUP\myServer1-cfg.xml"
    > WASPostUpgrade "C:\WAS4EBACKUP"  -import "C:\WAS4EBACKUP\OldServer-cfg.xml"
    
    

 

Migrate from V5.x

This example shows how to migrate a single instance of the base WebSphere Application Server, V5.x. Verify that you have stopped all Java processes related to the WAS product that you are migrating.

  1. Run the following WASPreUpgrade.bat command to migrate all applications in the installedApps directory of the V5.x Application Server, which has an installation root of C:\Program Files\WebSphere\AppServer

    WASPreUpgrade "C:\WAS5xxBACKUP"  C:\Program Files\WebSphere\AppServer
    

  2. Run the following WASPostUpgrade commands to restore the applications and configurations to the V6 Application Server

    WASPostUpgrade  "C:\WAS5xxBACKUP"
    


 

Related Tasks


Migrating product configurations

 

See Also


The clientUpgrade command
WASPreUpgrade command