Exporting and Importing Workspaces

Workspace Commands

It can often be useful to dump a workspace you have developed in a lab and migrate it to the live environment. From 6.1 Fixpack 3 there have been some tacmd commands that enable you to do this. This tip goes through a few of the more useful ones.

Security

To import, export or even list a workspace the TEPS user must have both Workspace Administration Mode and Workspace Author Mode permissions enabled on the server. The Workspace Administration Mode permission is disabled by default for most users.

If you do not have these you will get an error like that shown below:

KUICEW001I Validating user credentials...
KUICEW008E The
exportWorkspaces command failed because user "sysadmin" does not have
sufficient Workspace Administration privileges on the Tivoli Enterprise
Portal Server located at  http://daphne:1920.

Enabling Workspace Administration Mode

    1. Click on the Administrator icon on the desktop

admin icon

  1. Click on the appropriate Administrator
  2. Select the Permissions Tab And under Feature click on Workspace Administration.
  3. Tick the Workspace Administration Mode
  4. Press Apply

admin

Listing All Workspaces

To list all workspaces use tacmd listWorkspaces

For example:

tacmd listWorkspaces -s daphne -u sysadmin -p orbdata
KUICLW001I Validating user credentials...
KUICLW002I Obtaining workspace information from the server...
KUICLW010I Resolving runtime resource bundle jar file dependencies...
KUICLW011I Restarting application with updated classpath...
KUICLW002I Obtaining workspace information from the server...
KUICLW007I The following workspaces were found on the Tivoli Enterprise Portal Server at  http://daphne:1920:

Workspace Name: Disk Usage
Application Type: klz
TEPS User ID:

Workspace Name: Sockets Information
Application Type: klz
TEPS User ID:

Workspace Name: Process User Information
Application Type: klz
TEPS User ID:

Workspace Name: Virtual Memory Statistics
Application Type: klz
TEPS User ID:

Exporting a Workspace

Once you have the name of the workspace you wish to export you can dump it to an XML file using the command tacmd exportWorkspaces using the -w (workspace) and -x (XML file name) flags.

For example:

tacmd exportWorkspaces -s daphne -u sysadmin -p orbdata -w RUNNING_METHODS -x RUNNING_METHODS.xml
KUICEW001I Validating user credentials...
KUICEW002I Obtaining workspace information from the server...
KUICEW018I Resolving runtime resource bundle jar file dependencies...
KUICEW019I Restarting application with updated classpath...
KUICEW002I Obtaining workspace information from the server...
KUICEW009I Do you want to export the following workspaces from the
Tivoli Enterprise Portal Server on  http://daphne:1920 to the file
C:mteRUNNING_METHODS.xml?

Workspace Name: RUNNING_METHODS
Application Type: kum
TEPS User ID: SYSADMIN

Enter Y for yes or N for no: Y

KUICEW003I Obtaining workspaces from the server...
KUICEW004I Exporting workspaces to XML...
KUICEW010I The following workspaces were successfully exported from the
Tivoli Enterprise Portal Server on  http://daphne:1920 to the file
C:mteRUNNING_METHODS.xml:

Workspace Name: RUNNING_METHODS
Application Type: kum
TEPS User ID: SYSADMIN

This example exports all workspaces on the Tivoli Enterprise Portal Server daphne without any filtering arguments (such as workspace name, user ID, or application type). You can therefor use it to backup your workspaces

Example:

tacmd exportWorkspaces -s daphne -u sysadmin -p orbdata -x workspaces.xml

However be aware that this command is memory intensive. You may well get the following error:

KUICEW002I Obtaining workspace information from the server...
**Out of memory, aborting**

*** panic: JVMST019: Cannot allocate memory in allocateToMiddlewareHeap

abnormal program termination
JVMDG217: Dump Handler is Processing Signal 22 - Please Wait.
JVMDG303: JVM Requesting Java core file
JVMDG304: Java core file written to C:mtejavacore.20070328.193306.4288.txt
JVMDG215: Dump Handler has Processed Error Signal 22.

Importing a Workspace

To re-import a workspace from an XML file you have dumped use the command tacmd importWorkspaces using -x (XML file name) flags. You will be prompted for (Y or N) before you proceed. Us -f to avoid this prompt.

Note: The -w flag is longer needed because it uses the one specified in the XML file.

For example:

tacmd importWorkspaces -s daphne -u sysadmin -p orbdata -x RIM_STATUS.xml
KUICIW001I Validating user credentials...
KUICIW003I Reading XML and converting to workspaces...
KUICIW008I Do you want to import the following workspaces from the file
C:mteRIM_STATUS.xml to the Tivoli Enterprise Portal Server on
 http://daphne:1920?

Workspace Name: RIM_STATUS
Application Type: kum
TEPS User ID: SYSADMIN

Enter Y for yes or N for no: Y

KUICIW002I Obtaining workspace information from the server...
KUICIW011I The following workspaces will be overwritten on the Tivoli
Enterprise Portal Server on  http://daphne:1920. Do you wish to continue?

Workspace Name: RIM_STATUS
Application Type: kum
TEPS User ID: SYSADMIN

Visits: 206