InfluxDB Docs

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

influx export [flags]
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
--checksComma-separated list of check IDsstring
--dashboardsComma-separated list of dashboard IDsstring
--endpointsComma-separated list of notification endpoint IDsstring
-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
--resource-typeResource type associated with all IDs via stdinstring
--rulesComma-separated list of notification rule IDsstring
--skip-verifySkip TLS certificate verification
--stack-idStack ID to include resources from in exportstring
--tasksComma-separated list of task IDsstring
--telegraf-configsComma-separated list of Telegraf configuration IDsstring
-t--tokenAuthentication tokenstringINFLUX_TOKEN
--variablesComma-separated list of variable IDsstring

Examples

# 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 \
  --dashboards=$DID1,$DID2,$DID3

# 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

New! Cloud or OSS?