ConfigArchiveOperations command group for the AdminTask object using wsadmin scripting

You can use the Jython or Jacl scripting languages to configure servers in your environment. The commands and parameters in the ConfigArchiveOperations group can be used to export or import server configurations and entire cell configurations.

The ConfigArchiveOperations command group for the AdminTask object includes the following commands:

exportProxyProfile

Use the exportProxyProfile command to export the entire cell configuration of a secure proxy server to a configuration archive. The exportProxyProfile command does not work between the distributed and z/OS® operating systems.

Target object

None.

Required parameters

-archive
Specifies the fully qualified file path of the exported configuration archive. (String, required)

Return value

The command does not return output.

Batch mode example usage

  • [Windows]Using Jython string:
    AdminTask.exportProxyProfile('[-archive "c:/myCell.car"]')
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]Using Jython string:
    AdminTask.exportProxyProfile('-archive c:/myCell.car')
  • [Windows]Using Jython list:
    AdminTask.exportProxyProfile(['-archive', 'c:/myCell.car'])
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]Using Jython list:
    AdminTask.exportProxyProfile(['-archive', 'c:/myCell.car'])

Interactive mode example usage

  • Using Jython:
    AdminTask.exportProxyProfile('-interactive')

exportProxyServer

Use the exportProxyServer command to export the secure proxy server configuration to a node that is defined in the configuration archive. The command exports the metadata file of the node where the server resides. You can use this information later when you import the configuration archive to verify that the target node is compatible to the node from which you are exporting the server.

The exportProxyServer command virtualizes the server configuration and exports a server to a configuration archive. This process breaks any existing associations between the server configurations in the configuration archive and the configurations in the system.

Target object

None

Required parameters

-archive
Specifies the fully qualified path of the exported configuration archive. (String, required)
-serverName
Specifies the secure proxy server name. (String, required)

Optional parameters

-nodeName
Specifies the node name of the secure proxy server. This parameter is only required if the secure proxy server name is not unique across the cell. (String, optional)

Return value

The command does not return output.

Examples

Batch mode example usage:

  • Using Jython string:
    AdminTask.exportProxyServer('[-archive c:/myProxyServer.car -nodeName node1 
     -serverName server1]')
  • Using Jython list:
    AdminTask.exportProxyServer(['-archive', 'c:/myProxyServer.car', '-nodeName', 
     'node1', '-serverName', 'server1'])
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]
    Using Jython string:
    AdminTask.exportProxyServer('[-archive /myProxyServer.car -nodeName node1 
     -serverName server1]')
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]
    Using Jython list:
    AdminTask.exportProxyServer(['-archive', '/myProxyServer.car', '-nodeName', 'node1', 
     '-serverName', 'server1'])

Interactive mode example usage:

  • Using Jython:
    AdminTask.exportServer ('-interactive')

exportServer

Use the exportServer command to export the server configuration to a node that is defined in the configuration archive. Use the exportProxyServer command to export a proxy server configuration.

The exportServer command virtualizes the server configuration and exports a server to a configuration archive. This process breaks any existing associations between the server configurations in the configuration archive and the configurations in the system. This process also removes applications from the server that you specify, breaks the relationship between the server that you specify and the core group of the server, cluster, or service integration bus member.

The exportServer command exports the metadata file of the node where the server resides. You can use this information later when you import the configuration archive to verify that the target node is compatible to the node from which you are exporting the server.

Target object

None

Parameters and return values

-archive
Specifies the fully qualified path of the exported configuration archive. (String, required)
-nodeName
Specifies the node name of the server. This parameter is only required when the server name is not unique across the cell. (String, optional)
-serverName
Specifies the server name. (String, required)

Examples

Batch mode example usage:

  • Using Jacl:
    $AdminTask exportServer {-archive c:/myServer.car -nodeName node1 -serverName server1}
  • Using Jython string:
    AdminTask.exportServer('[-archive c:/myServer.car -nodeName node1 -serverName server1]')
  • Using Jython list:
    AdminTask.exportServer(['-archive', 'c:/myServer.car', '-nodeName', 'node1', '-serverName', 'server1'])

Interactive mode example usage:

  • Using Jacl:
    $AdminTask exportServer {-interactive}
  • Using Jython string:
    AdminTask.exportServer ('[-interactive]')
  • Using Jython list:
    AdminTask.exportServer (['-interactive'])

exportWasprofile

Use the exportWasprofile command to export the entire cell configuration to a configuration archive. The exportWasprofile command does not work between the distributed and z/OS platforms.
Restriction: Only a base server configuration with a single node is supported for the exportWasprofile command.
Use the exportProxyProfile command to export a secure proxy server configuration.

Target object

None

Parameters and return values

-archive
Specifies the fully qualified file path of the exported configuration archive. (String, required)

Examples

Batch mode example usage:
  • Using Jacl:
    $AdminTask exportWasprofile {-archive c:/myCell.car}
  • Using Jython string:
    AdminTask.exportWasprofile('[-archive c:/myCell.car]')
  • Using Jython list:
    AdminTask.exportWasprofile(['-archive', 'c:/myCell.car'])
Interactive mode example usage:
  • Using Jacl:
    $AdminTask exportWasprofile {-interactive}
  • Using Jython string:
    AdminTask.exportWasprofile ('[-interactive]')
  • Using Jython list:
    AdminTask.exportWasprofile (['-interactive'])

importApplicationsFromWasprofile

This script imports Java EE applications for the specified application server from an AdminTask exportWasprofile command generated configuration archive file (.car file) into a target cell configuration.

If you want to import a Java EE application that depends on a shared library, the shared library must be configured and exist on the target node before the imported application can successfully start. A Java EE application that is already deployed in the specified target cell cannot be imported.

Target object

None.

Parameters and return values

-archive
Specifies the fully qualified file path of the configuration archive. (String, required)
-targetNodeName
Specifies the node name of the target application server from which the applications will be imported. The specified node must exist in the target system. Do not specify this parameter if you specify a value for the targetClusterName parameter. (String, required if the targetClusterName parameter is not specified)
-targetServerName
Specifies the name of the target application server to which the applications will be imported. The server specified must exist in the target system. Do not specify this parameter if you specify a value for the targetClusterName parameter. (String, required if the targetClusterName parameter is not specified)
-targetClusterName
Specifies the name of the target cluster to which the applications will be imported. The cluster specified must exist in the target system. Do not specify this parameter if you specify a value for the targetNodeName and targetServerName parameters. (String, required if the targetNodeName and targetServerName parameters are not specified)
-sourceServerName
Specifies the name of source server from which the applications will be imported. The server specified must exist in the configuration archive file. This parameter is required under the following circumstances. Either
  • Multiple servers exist in the configuration archive file AND the source and target server names are different, or
  • The targetClusterName parameter is specified.

(String, optional)

Sample output

The command does not return output.

Examples

Batch mode example usage:

  • Using Jacl:
    $AdminTask importApplicationsFromWasprofile {-archive c:/myCell.car -targetNodeName myNodeName 
       -targetServerName myServerName -sourceServerName mySourceServerName}
    $AdminTask importApplicationsFromWasprofile {-archive c:/myCell.car -targetClusterName myClusterName
       -sourceServerName mySourceServerName}
  • Using Jython string:
    AdminTask.importApplicationsFromWasprofile('[-archive c:/myCell.car -targetNodeName myNodeName 
       -targetServerName myServerName -sourceServerName mySourceServerName]')
    AdminTask.importApplicationsFromWasprofile('[-archive c:/myCell.car 
       -targetClusterName myClusterName -sourceServerName mySourceServerName]')
  • Using Jython list:
    AdminTask.importApplicationsFromWasprofile(['-archive', 'c:/myCell.car', '-targetNodeName', 'myNodeName', 
       '-targetServerName', 'myServerName', '-sourceServerName', 'mySourceServerName'])
    AdminTask.importApplicationsFromWasprofile(['-archive', 'c:/myCell.car',
      '-targetClusterName', 'myClusterName', '-sourceServerName', 'mySourceServerName'])

Interactive mode example usage:

  • Using Jacl:
    $AdminTask importApplicationsFromWasprofile {-interactive}
  • Using Jython string:
    AdminTask.importApplicationsFromWasprofile ('[-interactive]')
  • Using Jython list:
    AdminTask.importApplicationsFromWasprofile (['-interactive'])

importProxyProfile

Use the importProxyProfile command to import a cell configuration in the configuration archive to the system. Only a base single server configuration is supported for this command. The importProxyProfile command does not work between the distributed and z/OS platforms.

Target object

None.

Required parameters

-archive
Specifies the fully qualified file path of the exported configuration archive. (String, required)

Optional parameters

-deleteExistingServers
Specifies whether to replace the existing secure proxy servers in the profile with the servers in the imported proxy profile. Specify true to overwrite the existing servers. (Boolean, optional)

Return value

The command does not return output.

Batch mode example usage

  • [Windows]Using Jython string:
    AdminTask.importProxyProfile('-archive c:/myCell.car -deleteExistingServers true')
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]Using Jython string:
    AdminTask.importProxyProfile('-archive /myCell.car -deleteExistingServers true')
  • [Windows]Using Jython list:
    AdminTask.importProxyProfile('-archive', 'c:/myCell.car', '-deleteExistingServers', 'true')
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]Using Jython list:
    AdminTask.importProxyProfile('-archive', '/myCell.car', '-deleteExistingServers', 'true')

Interactive mode example usage

  • Using Jython:
    AdminTask.importProxyProfile('-interactive')

importProxyServer

Use the importProxyServer command to import a secure proxy server that resides in a configuration archive to the system. This command imports all the server scope configurations defined in the configuration archive to system configuration.

Target object

None

Required parameters

-archive
Specifies the fully qualified path of the configuration archive to import. (String, required)

Optional parameters

-nodeInArchive
Specifies the node name of the server defined in the configuration archive. Specify a value for this parameter if multiple nodes exist in the configuration archive. (String, optional)
-serverInArchive
Specifies the name of the secure proxy server defined in the configuration archive. Specify a value for this parameter if multiple secure proxy servers exist in the archive. (String, optional)
-deleteExistingServer
Specifies whether to delete and replace an existing server if it has the same name as the server to import. Set the value of this command to true to overwrite existing servers with the same name. (String, optional)
-nodeName
Specifies the name of the node to which the secure proxy server is imported. This parameter is only required if the secure proxy server name is not unique across the cell. (String, optional)
-serverName
Specifies the secure proxy server name. If the server name that you specify matches an existing server name under the node, an exception is created. (String, optional)
-coreGroup
Specifies the core group name to which the secure proxy server belongs. (String, optional)

Return value

The command does not return output.

Examples

Batch mode example usage:

  • Using Jython string:
    AdminTask.importProxyServer('[-archive c:/myProxyServer.car -nodeName node1 
     -serverInArchive server1 -deleteExistingServer true]')
  • Using Jython list:
    AdminTask.importProxyServer(['-archive', 'c:/myProxyServer.car', '-nodeName', 'node1',
     '-serverInArchive', 'server1', '-deleteExistingServer', 'true'])
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]
    Using Jython string:
    AdminTask.importProxyServer('[-archive /myProxyServer.car -nodeName node1 -serverInArchive server1
     -deleteExistingServer true]')
  • [Linux][AIX][z/OS][HP-UX][IBM i][Solaris]
    Using Jython list:
    AdminTask.importProxyServer(['-archive', '/myProxyServer.car', '-nodeName', 'node1', 
     '-serverInArchive', 'server1', 'server1', '-deleteExistingServer', 'true'])

Interactive mode example usage:

  • Using Jython:
    AdminTask.importProxyServer('-interactive')

importServer

Use the importServer command to import a server that resides in a configuration archive to the system. This command imports all the server scope configurations defined in the configuration archive to system configuration. Use the importProxyServer command to import a secure proxy server configuration.

Target object

None

Parameters and return values

-archive
Specifies the fully qualified path of the configuration archive. (String, required)
-nodeInArchive
Specifies the node name of the server defined in the configuration archive. (String, optional if there is only one node defined in the configuration archive, required if there are multiple nodes defined in the configuration archive)
-serverInArchive
Specifies the name of the server defined in the configuration archive. (String, optional if there is only one server defined on the specified nodeInConfiguration archive, required if there are multiple servers defined under the specified nodeInConfiguration archive)
-nodeName
Specifies the node name where the server is imported. (String, optional if there is only one node)
-serverName
Specifies the server name where the server is imported. If the server name that you specify matches an existing server name under the node, an exception is created. (String, optional, default: serverInArchive)
-coreGroup
Specifies the core group name to which the server should belong. (String, optional)

Examples

Batch mode example usage:

  • Using Jacl:
    $AdminTask importServer {-archive c:/myServer.car -nodeInArchive node1 -serverInArchive server1}
  • Using Jython string:
    AdminTask.importServer('[-archive c:/myServer.car -nodeInArchive node1 -serverInArchive server1]')
  • Using Jython list:
    AdminTask.importServer(['-archive', 'c:/myServer.car', '-nodeInArchive', 'node1',
     '-serverInArchive', 'server1'])

Interactive mode example usage:

  • Using Jacl:
    $AdminTask importServer {-interactive}
  • Using Jython string:
    AdminTask.importServer ('[-interactive]')
  • Using Jython list:
    AdminTask.importServer (['-interactive'])

importWasprofile

Use the importWasprofile command to import a cell configuration in the configuration archive to the system. Only a base server configuration with single node is supported for this command. Use the importProxyProfile command to import a secure proxy server profile.

The importWasprofile command does not work between distributed and z/OS operating systems.

Target object

None

Parameters and return values

-archive
Specifies the fully qualified file path of the configuration archive. (String, required)
-deleteExistingServers
When set to true, specifies to remove existing servers from the target profile and import the configuration archive onto the target profile. (Boolean, optional)

Default value is false, which specifies to not replace servers.

Examples

Batch mode example usage:
  • Using Jacl:
    $AdminTask importWasprofile {-archive c:/myCell.car}
    
    $AdminTask importWasprofile { -archive profile.car -deleteExistingServers true}
  • Using Jython string:
    AdminTask.importWasprofile('[-archive c:/myCell.car]')
    AdminTask.importWasprofile('[-archive profile.car -deleteExistingServers true]')
  • Using Jython list:
    AdminTask.importWasprofile(['-archive', 'c:/myCell.car'])
    AdminTask.importWasprofile(['-archive', 'profile.car', '-deleteExistingServers', true])
Interactive mode example usage:
  • Using Jacl:
    $AdminTask importWasprofile {-interactive}
  • Using Jython string:
    AdminTask.importWasprofile ('[-interactive]')
  • Using Jython list:
    AdminTask.importWasprofile (['-interactive'])