influx export stack

  • influx CLI 2.0.0+
  • InfluxDB 2.0.0+

The influx export stack command exports all resources associated with a stack as a template. All metadata.name fields remain the same.

To export resources as a template, you must use the Operator token created for the initial InfluxDB user or an All-Access token. For information about creating an All-Access API token, see Create an API token.

Usage

  1. influx export stack <stack_id> [flags]

Flags

FlagDescriptionInput TypeMaps to ?
-c—active-configCLI configuration to use for commandstring
—configs-pathPath to influx CLI configurations (default ~/.influxdbv2/configs)stringINFLUX_CONFIGS_PATH
-f—fileTemplate output file. Defaults to stdout. Use .yml or .json file extensions.string
-h—helpHelp for the export stack command
—hostHTTP address of InfluxDB (default http://localhost:8086)stringINFLUX_HOST
—http-debugInspect communication with InfluxDB servers.string
-o—orgOrganization name that owns the resources (mutually exclusive with —org-id)stringINFLUX_ORG
—org-idOrganization ID that owns the resources (mutually exclusive with —org)stringINFLUX_ORG_ID
—skip-verifySkip TLS certificate verificationINFLUX_SKIP_VERIFY
-t—tokenAPI tokenstringINFLUX_TOKEN

Examples

Authentication credentials

The examples below assume your InfluxDB host, organization, and token are provided by the active influx CLI configuration. If you do not have a CLI configuration set up, use the appropriate flags to provide these required credentials.

Export a stack as a template
  1. influx export stack $STACK_ID