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.


influx export [flags]
influx export [command]

Available subcommands

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


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


# Export buckets by ID
influx export --buckets=$ID1,$ID2,$ID3

# Export buckets, labels, and dashboards by ID
influx export \
  --buckets=$BID1,$BID2,$BID3 \
  --labels=$LID1,$LID2,$LID3 \

# Export buckets, labels, and dashboards by name
influx export \
  --buckets=bucket1,bucket2,bucket3 \
  --labels=label1,label2,label3 \

# Export all resources associated with a stack
influx export --stack-id $STACK_ID

# Export resources associated with a stack and resources
# *not* associated with the stack
influx export --stack-id $STACK_ID --buckets $BUCKET_ID --dashboard-names bucket1

New! Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: