Export and import environments

Move an environment between Cloud Management Platform (CMP) instances as a zip file, in the UI or through the API

An export includes the environment along with its parameters, limits, OS builds, and rates. On import, CMP reuses any existing matching objects and creates the rest. Exporting requires administrator access.

Export an environment

  1. Go to Admin > Environments and select the environment’s name.
  2. Select Export.
  3. To encrypt the secrets this environment holds, enter a password of at least 12 characters. See Secrets in an exported environment.
  4. Select Next.
  5. Choose a format: sanitized, or instance-specific.

CMP downloads the zip file to your machine.

Import an environment

Importing is the Upload Environment option on the Environments page. See Upload an environment for the steps, including what happens when CMP cannot match a resource handler.

Export and import through the API

Both operations are POST requests. Find the environment’s global ID on its Overview tab; it looks like ENV-x57nm3w2.

Operation Request Parameters
Export POST /api/v3/cmp/environments/{globalId}/export/ instance_specific_info: set to true for the instance-specific format. Defaults to false, the sanitized format.
password: encrypts the secrets in the file.
The response is the zip file.
Import POST /api/v3/cmp/environments/ Send the file as multipart form data.
zipFile: required, the exported archive.
password: decrypts the secrets in the file.
replaceExisting: set to true to overwrite an environment of the same name. Defaults to false.

See REST API for authentication.

Sanitized and instance-specific formats

  • Sanitized. Omits details specific to the instance the file came from. Use it to share an environment with a CMP installation you do not own.
  • Instance-specific. Includes data specific to this installation, making it useful for moving content between your own instances, such as from dev to prod. May include sensitive information.

Secrets in an exported environment

Any password or encrypted text parameter value stored in the environment is encrypted on export and decrypted on import. Enter the same password at both ends.

  • If you export without one, CMP encrypts with a default key. Those secrets can then only be decrypted by importing back into the instance that produced the file.
  • If the password is missing or wrong at import time, the environment still imports, but without its secrets.

Global IDs during export and import

If you reference environments by global ID through the API, select Replace an existing environment if one is found with the same name during import, so the environment retains a consistent global ID across instances. Clear it, and CMP creates a second environment with the same name and a different global ID.

  • Add an environment: Create one from scratch, or upload an exported file.
  • REST API: Authentication and conventions for the requests above.