influx export all

The influx export all command exports all resources in an organization as an InfluxDB template. For detailed examples of exporting InfluxDB templates, see Create an InfluxDB template.

Usage

  1. influx export all [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
—filterSpecify resources to export by labelName or resourceKind (format: —filter=labelName=example)list of strings
-h—helpHelp for the export all command
—hostHTTP address of InfluxDB (default http://localhost:8086)stringINFLUX_HOST
-o—orgOrganization name that owns the resourcesstringINFLUX_ORG
—org-idOrganization ID that owns the resourcesstringINFLUX_ORG_ID
—skip-verifySkip TLS certificate verification
-t—tokenAuthentication tokenstringINFLUX_TOKEN

Examples

Export all resources in an organization as a template

  1. influx export all --org $INFLUX_ORG

Export all bucket resources as a template

  1. influx export all --org $INFLUX_ORG --filter=resourceKind=Bucket

Export all resources associated with label Foo

  1. influx export all --org $INFLUX_ORG --filter=labelName=Foo

Export all bucket resources and filter by label Foo

  1. influx export all --org $INFLUX_ORG \
  2. --filter=resourceKind=Bucket \
  3. --filter=labelName=Foo

Export all bucket or dashboard resources and filter by label Foo.

Note: “like” filters are unioned and filter types are intersections. For example, the following will export a resource if it is a dashboard or bucket and has an associated label of Foo.

  1. --filter=resourceKind=Bucket \
  2. --filter=resourceKind=Dashboard \
  3. --filter=labelName=Foo

Related articles