The WASPreUpgrade command is a migration tool
that saves the configuration and applications of a previous version or release
to a Version 6.0.x application server node.
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:
WASPreUpgrade.sh backupDirectory
currentWebSphereDirectory
[admin_node_name]
[-nameServiceHost host_name [-nameServicePort port_number ]]
[-import xmiDataFile ]
[-traceString trace_spec [-traceFile file_name ]]
The
command syntax is as follows on Windows platforms:
WASPreUpgrade.bat backupDirectory
currentWebSphereDirectory
[admin_node_name]
[-nameServiceHost host_name [-nameServicePort port_number ]]
[-import xmiDataFile ]
[-traceString trace_spec [-traceFile file_name ]]
Parameters
The parameters are as follows:
- backupDirectory
- This is a required parameter and must be the first parameter that you
specify. The value backupDirectory specifies the name of
the directory where the command script stores the saved configuration and
files. This is also the directory from which the WASPostUpgrade tool
reads the configuration and files. If the directory does not exist, the WASPreUpgrade command
script creates it.
- currentWebSphereDirectory
- This is a required parameter and must be the second parameter that you
specify. The value currentWebSphereDirectory specifies
the name of the installation root for the current Version 4.0.x, Version 5.0.x,
or Version 5.1.x installation. This can be any edition of WebSphere Application
Server Version 4.0.x, Version 5.0.x, or Version 5.1.x.
- adminNodeName
- If you are migrating from WebSphere Application Server Advanced Edition
Version 4.0.x, this parameter is required and must be the third parameter
that you specify; otherwise, it is optional. The value admin_node_name specifies
the name of the node that contains the administrative server for the previous
version of the product. The value of this argument is case-sensitive and must
match the node name given in the topology tree on the Topology tab
of the administrative console for the previous version. The WASPreUpgrade tool
uses this parameter to call the XMLConfig tool.
- -nameServiceHost
- This is a required parameter if you are migrating from WebSphere Application
Server Advanced Edition Version 4.0.x. The value host_name specifies
the host name used by the XMLConfig tool. If you do not
specify this parameter, the default host name is used.
- -nameServicePort
- This is a required parameter if you are migrating from WebSphere Application
Server Advanced Edition Version 4.0.x. The value port_number specifies
the port number used by the XMLConfig tool. If you do not
specify this parameter, the default port number is used.
- -import
- This is an optional parameter. The value xmiDataFile specifies
the name of the WebSphere Application Server Advanced Single Server Edition
Version 4.x XML Metadata Interchange (XMI) configuration file to process.
The default value is backupDirectory/config/server-cfg.xml,
where backupDirectory is the value specified for the backupDirectory
parameter.
If you are migrating a configuration that does not use the
default server-cfg.xml file, you must include this parameter
to specify the fully-qualified name of the configuration file.
This
parameter is only valid when upgrading from WebSphere Application Server Advanced
Single Server Edition, Version 4.
- -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.
Logging
The WASPreUpgrade tool
displays status to the screen while it runs. The tool also saves a more extensive
set of logging information in the WASPreUpgrade.log file
written to the backupDirectory directory,
where backupDirectory is the value specified for the backupDirectory
parameter. You can view the WASPreUpgrade.log file with
a text editor.
Migrated resources
WASPreUpgrade migrates
all of your resources and applications, but it does not migrate entities in
your classes directory.
Migration saves the following
files in the backup directory.
- For Version 5.x:
- classes
- config
- installableApps
- installedApps
- properties
WASPreUpgrade also saves all instances created
in the Version 5.x environment.
- For Version 4.0.x:
- bin/setupCmdLine.sh (or bin/setupCmdLine.bat for
Windows platforms)
- classes
- config
- installableApps
- installedApps (by default unless overridden within
a specified developer configuration file)
- installedConnectors (Advanced Edition Version 4.0.x
only)
- properties
Migrating from WebSphere Application Server
Advanced Edition Version 4.0.x
This 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 incrementally, to migrate separate configuration
files 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 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 default configuration file, server-cfg.xml,
as well as myServer1-cfg.xml and OldServer-cfg.xml.
> 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 the Version 6 application server:
> WASPostUpgrade C:\WAS4ABBACKUP
> WASPostUpgrade C:\WAS4CDBACKUP -import C:\WAS4CDBACKUP\myServer1-cfg.xml
> WASPostUpgrade C:\WAS4EBACKUP -import C:\WAS4EBACKUP\OldServer-cfg.xml
Migrating from WebSphere Application Server
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.
- Run the following WASPreUpgrade.bat command to migrate
all applications in the installedApps directory of the
Version 5.x application server, 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 Version 6 application server:
WASPostUpgrade "C:\WAS5xxBACKUP"