Importing and exporting WebSphere Application Server version 6/v7/v8 profiles

Technote (FAQ)


Question

How do you import and export a version 6.x/7.x IBM WebSphere Application Server profile so that it is independent of the server network or file system location on the current machine, in the context of IBM Rational Application Developer for WebSphere Software version 6.x/7.x?

Answer

1. Using the Rational Application Developer Servers view:

As of Rational Application Developer v6.0.1.1 plus Interim Fix (iFix) 001 and iFix002, you can select (right click) a WebSphere Application Server version 6 server in the Server view and specify either Export server configuration to server or Import server configuration from server.

Import server configuration from server can be paraphrased as import the WebSphere Application Server v6 server profile configuration archive file into a workspace project folder. It performs the same functionality as the wsadmin AdminTask exportWasprofile.

Note: Having the server profile configuration archive in a workspace project makes it possible to have it checked into a Source Configuration Management (SCM) system such as Rational ClearCase or CVS.
The configuration archive file has also been referred to using the acronym CAR in the WebSphere v6.x/7.x Info Centers, as it has file type .car ( == compressed archive).

Export server configuration to server can be paraphrased as export the WebSphere Application Server v6 server profile configuration archive file from a workspace project folder to a WebSphere Application Server v6 server.The WebSphere Application Server v6.x must be stopped before performing this task. It performs the same functionality as the wsadmin AdminTask importWasprofile.

This is documented for Rational Application Developer v6 in the Related Information item, Product Documentation Update: WebSphere Application Server Toolkit Version 6.0.2.2 and Interim Fix 002 for Rational Application Developer V6.0.1.1

In Rational Application Developer v7 Help see Related Information Items:
- Rational Application Developer v7 - Importing server configuration from WebSphere Application Server v6.x
- Rational Application Developer v7 - Exporting server configuration to a WebSphere Application Server v6.x

In Rational Application Developer v7.5 and v8.0, the IDE command is simply "Backup" | "Restore" a server configuration {from|to} a WebSphere Application Server, as per the Related Information items.

Using the wsadmin [export | import]Wasprofile command is described in the next step.



2. Using the Command Line:

Exporting an Application Server profile:

Once you have customized a server profile configuration according to your application's needs, such as datasource configuration, security settings, and so forth, then you can export the configuration files to a configuration archive using the wsadmin AdminTask exportWasprofile command. To execute a wsadmin command, the server must be started, which you can do either from Rational Application Developer or from the WebSphere Application Server command line tools.

Starting the server from Rational Application Developer:

  • Right-click on the version 6 WebSphere Test Environment instance in Servers view and select Start.

Starting the server from the command line:
  • Open a new command window and navigate to the WebSphere Application Server v6.0
    <RAD Installation Directory>\runtimes\base_v6\profiles\<profile name>\bin directory.

    In the case of Rational Application Developer v7.x and WebSphere Application Server v6.0, v6.1 or v7.0 respectively:

    <RAD Installation Directory>\SDP{7x}\runtimes\base_v6\profiles\<profile name>\bin
    <RAD Installation Directory>\SDP{7x}\runtimes\base_v61\profiles\<profile name>\bin
    <RAD Installation Directory>\SDP{7x}\runtimes\base_v7\profiles\<profile name>\bin

    In the case of Rational Application Developer v8.x and WebSphere Application Server v8.0
    , the server is separately installed in any chosen location:
    <WAS_HOME>\profiles\<profile name>\bin

  • Start the Application Server using the following command:
    startServer.bat <SERVER_NAME>
    (by default: <SERVER_NAME> will be server1)
    For example, use startServer.bat server1 on a Microsoft Windows OS or startServer.sh server1 on Linux.

After the server has started, run the wsadmin script, located in the < RAD Installation Directory >\runtimes\base_v6\profiles\<profile name>\bin directory, to start the wsadmin tool.

> wsadmin

wsadmin defaults to the JACL scripting in WebSphere Application Server v6.x. In the case of WebSphere Application Server v6.1 + JACL is deprecated and the use of Jython is encouraged. To start wsadmin using jython you would use:

> wsadmin -lang jython


If it starts successfully, the wsadmin tool will display output similar to this:

WASX7209I: Connected to process "server1" on node rbajajNode03 using SOAP connector; The type of process is: UnManagedProcess WASX7029I: For help, enter: "$Help help"  

wsadmin>


To export a profile,

Using JACL:


    $AdminTask exportWasprofile {-archive d:\sampleProfileName.car}

followed by:

    $quit

Using Jython
with a Jython String paramater:

    AdminTask.exportWasprofile('[-archive d:\sampleProfileName.car]')


,or with a Jython List of Strings paramater:

    AdminTask.exportWasprofile(['-archive', 'd:\sampleProfileName.car'])


followed by:

    quit   ( or exit


Notes:
  • The name of the exported profile file (such as sampleProfileName) can be different from the actual WebSphere Application Server server profile name. The file type extension car represents that it is a configuration archive.
  • The Service Integration Bus (SIB) configuration information is not included when exporting a WebSphere Application Server v6.x profile. See Related Information item: PK14904: EXCLUDE SERVICE INTEGRATION BUS CONFIGURATION FROM EXPORTWASPROFILE CAR

    If a more extensive/complete "overall" backup of WebSphere Application Server v6.x/v7.x administrative configuration server files is needed, typical of what WebSphere Application Server admininstrators do using backupConfig or restoreConfig commands, refer to the server Info Center. For Example ,
    from the WebSphere Application Server v6.1 InfoCenter:
    "Backing up and restoring administrative configuration files"
    See also:
    "The service integration environment backup"

    Contact IBM Support for WebSphere Application Server, for further assistance on backup/restore of SIB configurations.

  • See Related Infromation Item: WebSphere Application Server v6.1 Developing Automation Scripts, regarding Jython and tooling support in WebSphere Application Server v6.1


Importing an Application Server Profile:
To import a server profile that was previously exported, it is necessary to create a new server profile using the WebSphere Application Server profile creation tool. The existing profile configuration will be imported into this new profile.

Follow the steps from the Exporting an Application Server profile section to start the WTE version 6 and the wsadmin tool.

Enter the following commands to import the profile information to the newly created profile,

Using JACL:
    $AdminTask importWasprofile {-archive d:\sampleProfileName.car}

    $AdminConfig save

    $quit

Using Jython
with a Jython String paramater:

    AdminTask.importWasprofile('[-archive d:\sampleProfileName.car]')


,or with a Jython List of Strings paramater:

    AdminTask.importWasprofile(['-archive', 'd:\sampleProfileName.car'])

,followed by:

    AdminConfig.save()

    quit


The changes from the imported server profile will be seen only after restarting the server.

Notes:
  • WebSphere 6.0 supports only single node/server for the importWasprofile and exportWasprofile commands.
  • If the imported profile had JAAS authentication entries, they might need to be updated to correspond to the current node.
  • Should you encounter any errors while trying to import or export a server profile, please consult IBM WebSphere Application Server support.

Rational Application Developer v7.5 Note:

Although the above information refers to WebSphere Application Server v6.x server profiles, it also applies to WebSphere Application Server v7.0 supported in Rational Application Developer v7.5. In which case the server profiles are typically located in:

< RAD 7.5 Installation Directory >\SDP75\runtimes\base_v7\profiles\<profile name>\

Related information

WAS6 Information Center
wsadmin tool
wsadmin [ import|export]Wasprofile
1201697: Create new WAS profile
wasprofile
WebSphere Management Config Archive Subsystem messages
Product Documentation Update: WAS Toolkit V6.0.2 and I
WAS v6.1 wsadmin [import|export]Wasprofile
WAS v6.1 Developing Automation Scripts - Jython
WAS v6.1 Wsadmin tool
RAD v7 - Importing server configuration from WAS v6.x
RAD v7 - Exporting server configuration to a WAS v6.x
PK14904 EXCLUDE SIB
WAS70 IC - wsadmin Import/export profile
RAD v7.5: Backing up server configuration from a WAS
RAD v7.5: Restoring server configuration to a WAS
RAD v8:Backing up server configuration from ...
RAD v8:Restoring server configuration to ..

Cross reference information
Segment Product Component Platform Version Edition
Software Development Rational Web Developer for WebSphere Software Integrated WebSphere Test Environment Windows, Linux 6.0, 6.0.0.1, 6.0.1.0, 6.0.1.1
Software Development Rational Software Architect Integrated WebSphere Test Environment Linux, Windows 6.0, 6.0.0.1, 6.0.1, 6.0.1.1, 7.0, 7.0.0.1, 7.0.0.2

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Application Developer for WebSphere Software
Integrated Test Environment

Software version:

6.0, 6.0.0.1, 6.0.1, 6.0.1.1, 6.0.1.2, 7.0, 7.0.0.1, 7.0.0.2, 7.0.0.3, 7.0.0.4, 7.0.0.5, 7.0.0.6, 7.0.0.7, 7.0.0.8, 7.0.0.9, 7.0.0.10, 7.5, 7.5.1, 7.5.2, 7.5.3, 7.5.4, 7.5.5, 7.5.5.1, 7.5.5.2, 7.5.5.3, 7.5.5.4, 7.5.5.5, 8.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4

Operating system(s):

Linux, Windows

Reference #:

1207526

Modified date:

2011-09-12

Translate my page

Machine Translation

Content navigation