WASPostUpgrade command
The WASPostUpgrade command is a migration
tool for adding the configuration and applications of a previous version or
release to a WebSphere Application Server Version 6.0.x node.
The WASPostUpgrade tool
retrieves the saved configuration that was created by the WASPreUpgrade tool
from the backupDirectory that you specified. The WASPostUpgrade script
reads the configuration from this directory to migrate to WebSphere Application
Server Version 6.0.x. The tool adds all migrated applications into the app_server_root/installedApps directory
for the WebSphere Application Server Version 6.0.x installation.
Location
The command file is located
and should be run in the app_server_root/bin directory.
Syntax
The command
syntax is as follows on Linux-based platforms:
WASPostUpgrade.sh backupDirectory
[-oldProfile profile_name]
[-profileName profile_name]
[-import xmi_data_file]
[-scriptCompatibility true | false]
[-portBlock port_starting_number]
[-backupConfig true | false]
[-replacePorts true | false]
[-substitute "key1=value1[;key2=value2;[...]]"]
[-includeApps true | false]
[-traceString trace_spec [-traceFile file_name]]
[-connectionTimeout timeout]
The
command syntax is as follows on Windows platforms:
WASPostUpgrade.bat backupDirectory
[-oldProfile profile_name]
[-profileName profile_name]
[-import xmi_data_file]
[-scriptCompatibility true | false]
[-portBlock port_starting_number]
[-backupConfig true | false]
[-replacePorts true | false]
[-substitute "key1=value1[;key2=value2;[...]]"]
[-includeApps true | false]
[-traceString trace_spec [-traceFile file_name]]
[-connectionTimeout timeout]
Parameters
The parameters are as
follows:
- backupDirectory
- This is a required parameter. The value backupDirectory specifies
the name of the directory in which the WASPreUpgrade tool
stores the saved configuration and files and from which the WASPostUpgrade tool
reads the configuration and files.
- -oldProfile
- This is an optional parameter for migrating instances from previous WebSphere
Application Server versions or profiles. The instance or profile must already
exist in the migration backup directory before executing this command. In
WebSphere Application Server Version 5.x, unique instance names were defined
by the concatenation of -instanceName and -hostName; this concatenation forms
the profile_name that you need to use with the -oldprofile
parameter. In WebSphere Application Server Version 5.x, this concatenation
is stored in the app_server_root/properties directory
in a file called wsinstance.config.
- -profileName
- This is an optional parameter for migrating to profiles in WebSphere Application
Server Version 6.0.x. The value profile_name specifies
the name of the WebSphere Application Server Version 6.0.x profile to which
the script migrates your configuration. You must have already created this
profile before calling the WASPostUpgrade command.
If the -profileName parameter is not specified, the default profile will be
used. If no default profile is found, the system will report an error.
- -import
- This is an optional parameter. The value xmi_data_file specifies
the name of the WebSphere Application Server Advanced Single Server Edition
or Advanced Edition Version 4.0 XML Metadata Interchange (XMI) configuration
file to process. The default is backupDirectoryconfig/server-cfg.xml,
where backupDirectory is the value that you specified for
the backupDirectory parameter when you ran the WASPreUpgrade command.
If
you are migrating a configuration that does not use the default server-cfg.xml file,
you must include the -import parameter to specify the fully-qualified name
of the configuration file that the WASPreUpgrade tool
created.
- -scriptCompatibility
- This is 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 definitions. The default is
true.
- -portBlock
- This is an optional parameter. The port_starting_number value
specifies the first of a block of consecutive port numbers to assign when
the command script runs.
- -backupConfig
- This is an optional parameter. Valid values for this parameter are true
and false. If true is specified, then the existing Version 6.0.x configuration
is saved before any changes are made by the WASPostUpgrade tool.
The default is true—that is, to use the backupConfig command
to save a copy of the current configuration into the profile_name/temp directory.
Use
the restoreConfig command to restore that configuration
as required. See restoreConfig command.
- -replacePorts
- This is an optional parameter used to define how to migrate virtual host
and server transport ports. The default for migrations from WebSphere Application
Server Version 4.0.x is false—that is, do not replace default port definitions;
the default for migrations from WebSphere Application Server Version 5.x is
true—that is, do replace default port definitions. Migrating adds configuration
data from the previous version to the existing data in the WebSphere Application
Server Version 6.0.x 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 WebSphere Application Server Version 6.0.x. Use the -replacePorts parameter
to totally replace settings in the WebSphere Application Server Version
6.0.x environment with the settings from the previous version. Select true
to replace all virtual host alias port settings during migration. If migrating
from WebSphere Application Server Version 5.0.x or later, transport settings
in existing servers are replaced by the settings from the previous version.
- -substitute
- This is an 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 WebSphere Application Server Advanced Edition
Version 4.0.x.
- -includeApps
- This is an optional parameter used to specify whether or not to migrate
only the old configuration or to include user enterprise applications as part
of the migration. The default is true. WebSphere Application Server system
applications will migrate regardless of the value set by this parameter.
- -traceString
- This is an optional parameter. The value trace_spec specifies
the trace information that you want to collect. To gather all trace information,
specify "*=all=enabled" (with quotation marks). The
default is to not gather trace information. If you specify this parameter,
you must also specify the -traceFile parameter.
- -traceFile
- This is an optional parameter. The value file_name specifies
the name of the output file for trace information. If you specify the -traceString
parameter but do not specify the -traceFile parameter, the script does not
generate a trace file.
- -connectionTimeout
- This is an optional parameter
to be used if a SOAP/RMI timeout occurs when performing a migration of a managed
node. The value timeout 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. You
can view the WASPostUpgrade.log file with a text editor.
Migrating from WebSphere Application Server
Advanced Edition Version 4.0.x
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 your_node_name
Migrating from WebSphere Application Server
Advanced Single Server Edition Version 4.0.x with multiple backup directories
This
example shows how to migrate separate configuration files incrementally from
a single node with a single installation of WebSphere Application Server Advanced
Single Server Edition. To migrate more than one configuration file, you must
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, you should not use a single backup directory for all the
runs of the
WASPreUpgrade tool. 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.
- 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
- Run the following WASPostUpgrade commands to
restore the applications and configurations to WebSphere Application Server
Version 6.0.x:
> WASPostUpgrade C:\WAS4ABBACKUP
> WASPostUpgrade "C:\WAS4CDBACKUP" -import "C:\WAS4CDBACKUP\myServer1-cfg.xml"
> WASPostUpgrade "C:\WAS4EBACKUP" -import "C:\WAS4EBACKUP\OldServer-cfg.xml"
Migrating from Version 5.x
This
example shows how to migrate a single instance of the base WebSphere Application
Server Version 5.x.
- Verify that you have stopped all Java processes related to the WebSphere
Application Server product that you are migrating.
- Verify that you have stopped all Java processes related to the WebSphere
Application Server Version 6.0.x destination profile.
- If you are migrating a WebSphere Application Server Version 5.x cell,
it is acceptable to leave the previous version's Java processes running because
they will be stopped as part of the migration process. If you are migrating
from WebSphere Application Server Version 4.0.x or from a WebSphere Application
Server Version 5.x stand-alone application server, make sure that you stop
all of the Java processes for the WebSphere Application Server version from
which you are migrating.
- Run the following WASPreUpgrade.bat command to migrate
all applications in the installedApps directory of WebSphere
Application Server Version 5.x, which has an installation root of C:\Program
Files\WebSphere\AppServer.
WASPreUpgrade "C:\WAS5xxBACKUP" C:\Program Files\WebSphere\AppServer
- Run the following WASPostUpgrade commands to
restore the applications and configurations to the WebSphere Application Server
Version 6.0.x:
WASPostUpgrade "C:\WAS5xxBACKUP"
Note: If the WebSphere Application Server Version 6.0.x destination
stand-alone profile is running when migration occurs, the administrative console
might indicate "unknown" for enterprise application status or behave in some
other unexpected way. Restart the server to remove this problem. After a migration
to a running WebSphere Application Server Version 6.0.x destination stand-alone
profile succeeds, shut down the server and restart it before making any additional
configuration changes.
|
