Back to Influxdb

Stack

content/shared/influxdb-v2/reference/cli/influx/export/stack.md

latest2.4 KB
Original Source

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

{{% note %}} 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. {{% /note %}}

Usage

influx export stack <stack_id> [flags]

Flags

FlagDescriptionInput Type{{< cli/mapped >}}
-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

{{< cli/influx-creds-note >}}

Export a stack as a template
sh
influx export stack $STACK_ID