The CLI export command creates a package that consists of applications and their associated blueprints and deployment profiles, external services, policies, services, logical templates, and available custom tasks to export between different vCloud Application Director instances.

You cannot export application, service version, external service, script task, and policy version names that contain characters other than space, tab, underscore, new line, or carriage return.

You can export only those applications, services, and external services that the current group of the logged in user owns. When you run the import command, the entire package is imported to the designated server. You cannot selectively import elements from the export package.

When you export an application, service, external service, script task, or policy version, all of the secure properties are removed by default to avoid exporting sensitive information such as passwords to another vCloud Application Director instance.

CLI Export Commands

CLI Command

Description

export-package --exportFilePath ExportFilePath
--applicationVersion ApplicationVersionSpecification
  --serviceVersion ServiceVersionSpecification

Exports an application and service version.

For example, you can specify the exportFilePath as /Users/UserName/tmp/test.xml.

If the specified directory in the ExportFilePath is not available when you run the export command, the operation fails.

The ApplicationVersionSpecification command option includes ApplicationName : major . minor . micro {-qualifier}.

Specifying ServiceVersionSpecification is optional because, during the export process all of the application dependencies are exported. The command option includes ServiceName : major . minor . micro {-qualifier}.

You can export multiple application and service versions at the same time. For example,

export-package --exportFilePath 
/Users/test_user/tmp/test.xml --applicationVersion 
"Clustered Dukes Bank App:2.1.0,
Clustered Zimbra App:7.1.0,
App_with_Qualifier:11.22.33-RELEASE"
--serviceVersion "Hyperic HQ Agent:4.6.0,Hyperic HQ
Server:4.6.0, Preinstalled vFabric GemFire Server for Ubuntu:6.6.0"

If the application version contains spaces, you must put the application version in double quotation marks.

export-package --exportFilePath ExportFilePath
  --externalServiceVersion ExternalServiceVersion --substituteSecuredProperties

Exports the external service version.

The ExternalServiceVersion command option includes ExternalServiceName : major . minor . micro {-qualifier}.

Specifying substituteSecuredProperties is optional because, during the export process if the option is not specified, all of the secured property values are removed. If the command option is specified, all of the secured property values are encrypted with the V!rtua1Mach!ne string.

export-package --exportFilePath 
/Users/test_user/tmp/test.xml --externalServiceVersion LoadBalancer:1.0.0

If the external service name contains spaces, you must put the external service name in double quotation marks.

export-package --exportFilePath ExportFilePath
  --policyVersion PolicyVersion --substituteSecuredProperties

Exports the policy version.

The PolicyVersion command option includes PolicyName : major . minor . micro {-qualifier}.

Specifying substituteSecuredProperties is optional because, during the export process if the option is not specified, all of the secured property values are removed. If the command option is specified, all of the secured property values are encrypted with the V!rtua1Mach!ne string.

export-package --exportFilePath 
/Users/test_user/tmp/test.xml --policyVersion "Memory Policy:1.0.0"

If the policy name contains spaces, you must put the policy name in double quotation marks.

export-package --exportFilePath allApps.pkg 
--applicationVersion ALL

Exports all of the applications and associated versions.

export-package --exportFilePath allServiceVersions.pkg 
--serviceVersion ALL

Exports all of the services and associated versions.

export-package --exportFilePath allAVSV.pkg --applictionVersion ALL
--serviceVersion ALL

Exports all of the application and service versions.

export-package --exportFilePath allExternalServiceVersions.pkg 
--externalServiceVersion ALL

Exports all of the external service versions.

export-package --exportFilePath allPolicied.pkg --policyVersion ALL

Exports all of the policy versions.

export-package --exportFilePath allSTandFewAVSV.pkg --applicationVersion 
ApplicationVersionList
--serviceVersion ServiceVersionList
--externalServiceVersion ExternalServiceVersionList
   --scriptTaskVersion ALL

Exports all of the custom tasks.

The ApplicationVersionList command option includes, ApplicationVersion : major . minor . micro -optional_qualifier.

The ServiceVersionList command option includes, ServiceVersion : major . minor . micro -optional_qualifier.

The ExternalServiceVersionList command option includes, ExtrenalServiceVersion : major . minor . micro -optional_qualifier.

export-package --exportFilePath 
/Users/test_user/tmp/mixed_package.xml --applicationVersion
 "DukesBank:1.0.0,SpringTravel:2.0.0,Zimbra:1.0.0" 
--serviceVersion "MySQL:1.0.0,RabbitMQ:2.0.0,Postgres:1.0.0"
--externalServiceVersion "LoadBalancer:1.0.0,vPostgres 9.x:9.2.0" 
--scriptTaskVersion ALL