Skip to main content

Mass Instance Export

mass instance exportโ€‹

Export instances

Synopsisโ€‹

Export Instance Details

Exports an instance to the local filesystem. This is useful for backups and migrations.

Data will be exported into a directory, named via the instance slug:

shell
instance
โ”œโ”€โ”€ artifact_<name>.json
โ”œโ”€โ”€ bundle
โ”‚ โ”œโ”€โ”€ <data...>
โ”œโ”€โ”€ params.json
โ”œโ”€โ”€ <path>.tfstate.json

The data which will be exported for each instance includes:

  • artifact_<name>.json: Each resource for the deployed instance (if applicable)
  • bundle: Directory containing deployed bundle version
  • params.json: Current instance configuration
  • <path>.tfstate.json: Terraform/OpenTofu state file for each step (if applicable)

Data will only be exported for instances in the PROVISIONED state. Data will NOT be exported for instances in the INITIALIZED, DECOMMISSIONED or FAILED state. Instances which are remote references will only download the resource files.

Usageโ€‹

shell
mass instance export <project-slug>-<environment-slug>-<instance-slug>

Examplesโ€‹

shell
# Export the "app" instance in the "prod" environment of the "web" project
mass instance export web-prod-app
mass instance export <project>-<env>-<manifest> [flags]

Optionsโ€‹

  -h, --help   help for export

Options inherited from parent commandsโ€‹

      --profile string   Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)

SEE ALSOโ€‹

  • mass instance - Manage instances of IaC deployed in environments.