influx export

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

Usage

  1. influx export [flags]
  2. influx export [command]

Available subcommands

SubcommandDescription
allExport all resources in an organization as a template
stackExport all resources associated with a stack as a template

Flags

FlagDescriptionInput TypeMaps to ?
—bucketsComma-separated list of bucket IDsstring
—bucket-namesComma-separated list of bucket namesstring
—checksComma-separated list of check IDsstring
—check-namesComma-separated list of check namesstring
—configs-pathPath to influx CLI configurations (default ~/.influxdbv2/configs)stringINFLUX_CONFIGS_PATH
—dashboardsComma-separated list of dashboard IDsstring
—dashboard-namesComma-separated list of dashboard namesstring
—endpointsComma-separated list of notification endpoint IDsstring
—endpoint-namesComma-separated list of notification endpoint namesstring
-f—fileTemplate output file. Defaults to stdout. Use .yml or .json file extensions.string
-h—helpHelp for the export command
—hostHTTP address of InfluxDB (default http://localhost:9999)stringINFLUX_HOST
—labelsComma-separated list of label IDsstring
—label-namesComma-separated list of label namesstring
—resource-typeResource type associated with all IDs via stdinstring
—rulesComma-separated list of notification rule IDsstring
—rule-namesComma-separated list of notification rule namesstring
—skip-verifySkip TLS certificate verification
—stack-idStack ID to include resources from in exportstring
—tasksComma-separated list of task IDsstring
—task-namesComma-separated list of task namesstring
—telegraf-configsComma-separated list of Telegraf configuration IDsstring
—telegraf-config-namesComma-separated list of Telegraf configuration namesstring
-t—tokenAuthentication tokenstringINFLUX_TOKEN
—variablesComma-separated list of variable IDsstring
—variable-namesComma-separated list of variable namesstring

Examples

  1. # Export buckets by ID
  2. influx export --buckets=$ID1,$ID2,$ID3
  3. # Export buckets, labels, and dashboards by ID
  4. influx export \
  5. --buckets=$BID1,$BID2,$BID3 \
  6. --labels=$LID1,$LID2,$LID3 \
  7. --dashboards=$DID1,$DID2,$DID3
  8. # Export buckets, labels, and dashboards by name
  9. influx export \
  10. --buckets=bucket1,bucket2,bucket3 \
  11. --labels=label1,label2,label3 \
  12. --dashboards=dashboard1,dashboard2,dashboard3
  13. # Export all resources associated with a stack
  14. influx export --stack-id $STACK_ID
  15. # Export resources associated with a stack and resources
  16. # *not* associated with the stack
  17. influx export --stack-id $STACK_ID --buckets $BUCKET_ID --dashboard-names bucket1

Related articles