export

Back to index

Summary

Export part or all of the server data to an XML file. --compress can be used to compress the XML output. --excludeJobs can be used to exclude jobs from the export data. --path exports the single object specified by the path. The default is to export all data in the system.

The export is executed by the CloudBees CD/RO service user. Before you perform an export, ensure the CloudBees CD/RO server is inactive and cannot accept jobs, by completing the following steps on the server:

  1. Disable any polling triggers and all project schedules.

    1. Navigate to DevOps essentials  Triggers.

    2. In the Enabled column, disable any active triggers.

    3. Navigate to DevOps essentials  Platform Home page.

    4. Select Electric Cloud from the Projects tab.

    5. Select the Schedules tab, and disable all schedules.

  2. Ensure all jobs are stopped.

    1. Navigate to DevOps essentials  Platform Home page.

    2. Select the Jobs tab.

    3. Review the jobs list and take action to stop all jobs.

  3. Disable all resources so that no new job steps can run.

    1. Navigate to DevOps essentials  Resources.

    2. Disable each resource by clearing its state from the Enabled column.

A quiescent database ensures a complete XML database file is exported. As a best practice, exporting individual projects is preferred to exporting the full database. If it is necessary to perform a full export, do it during a quite period noting the following:

  • It is memory intensive.

  • It can perform slowly, possibly taking days depending on the amount of data to export.

  • The default timeout is 10800 seconds (180 minutes or 3 hours).

A full export/import preserves job IDs, but a partial import preserves names only, and not IDs.
fileName
Stringrequired
The filename from/to which the import/export is done.
compress
Booleanoptional
If true, the output will be compressed.
disableProjectTracking
Booleanoptional
If set to true when importing or exporting a project, even if the original project had change tracking enabled, make change tracking of the newly imported or exported project be disabled from its creation. If you don't need to track changes to the new project, this avoids the change tracking overhead that would otherwise slow down the import operation, and also saves having to subsequently disable change tracking of the reimported project.
download
Booleanoptional
Export file will be available to download.
excludeJobs
Booleanoptional
True to exclude jobs from the export.
objectId
UUIDoptional
Object ID.
objectType
Stringoptional
Object type.
path
Stringoptional
A property path indicating a single object to be exported (for export) or the location at which to import (for import).
reducedDetailChangeHistory
Booleanoptional
Set to 0 or false to prevent importing a large project that has change tracking enabled from automatically reducing the level of detail that it tracks for the change history of the import -- this will make the import operation take longer and put more load on the database, but will allow the Change History feature to still show the full detail of entities owned by the imported project that were created by the import operation.
relocatable
Booleanoptional
True to emit relocatable content (no IDs, ACLs, or times).
revisionNumber
Integeroptional
Revision number.
safeMode
Stringoptional
Determines the mode to use during a full export. If set to none, the default behavior applies. If set to restart, then the server will be stopped during the full export and restarted on completion. If set to shutdown, then the server will be stopped during the full export and shutdown on completion.
Possible values: "none", "restart", "shutdown"
withAcls
Booleanoptional
True to emit ACLs in relocatable exports.
withNotifiers
Booleanoptional
True to emit emailNotifiers in relocatable exports.
withVersionNumbers
Booleanoptional
True to emit version numbers (ignored on import).

Usage

Perl

$cmdr->export( "test-fileName" # fileName # optionals );

ectool

ectool export \ "test-fileName" `# fileName` \ # optionals

Examples

Perl

$cmdr->export("c:\ElectricCommander\Aug 15 2015.xml"); $cmdr->export("c:\ElectricCommanderBackup\Test Proj.xml", {path => "/projects[Test Proj]", relocatable => "true", withNotifiers => "true"});

ectool

ectool export "c:\ElectricCommanderBackup\Aug 15 2015.xml" ectool export "c:\ElectricCommanderBackup\Test Proj.xml" --path "/projects[Test Proj]" --relocatable true --withNotifiers true