Migrate data from InfluxDB 1.x to InfluxDB Clustered
InfluxDB Clustered is currently only available to a limited group of InfluxData customers. If interested in being part of the limited access group, please contact the InfluxData Sales team.
To migrate data from an InfluxDB 1.x OSS or Enterprise instance to InfluxDB Clustered, export the data as line protocol and write the exported data to an InfluxDB database.
Before you migrate
Before you migrate from InfluxDB 1.x to InfluxDB Clustered, there are schema design practices supported by the TSM storage engine that are not supported in the InfluxDB v3 storage engine. Specifically, InfluxDB v3 enforces the following schema restrictions:
- You can’t use duplicate names for tags and fields.
- By default, measurements can contain up to 250 columns where each column represents time, a field, or a tag.
For more information, see Schema restrictions.
If your schema does not adhere to these restrictions, you must update your schema before migrating to InfluxDB Clustered.
Tools to use
The migration process uses the following tools:
influx_inspectutility is packaged with InfluxDB 1.x OSS and Enterprise.
- v1 API
/writeendpoint or v2 API
/api/v2/writeendpoint and API client libraries.
Export data from your InfluxDB 1.x instance as line protocol.
Use the InfluxDB 1.x
influx_inspect exportutility to export data as line protocol and store it in a file. Include the following:
-lponlyflag to export line protocol without InfluxQL DDL or DML.
-outflag with a path to an output file. Default is
~/.influxdb/export. Any subsequent export commands without the output file defined will overwrite the existing export file.
-compressflag to use gzip to compress the output.
-datadirflag with the path to your InfluxDB 1.x
datadirectory. Only required if the
datadirectory is at a non-default location. For information about default locations, see InfluxDB OSS 1.x file system layout or InfluxDB Enterprise 1.x file system layout.
-waldirflag with the path to your InfluxDB 1.x
waldirectory. Only required if the
waldirectory is at a non-default location. For information about default locations, see InfluxDB OSS 1.x file system layout or InfluxDB Enterprise 1.x file system layout.
-databaseflag with a specific database name to export. By default, all databases are exported.
-retentionflag with a specific retention policy to export. By default, all retention policies are exported.
-startflag with an RFC3339 timestamp that defines the earliest time to export. Default is
-endflag with an RFC3339 timestamp that defines the latest time to export. Default is
We recommend exporting each database and retention policy combination separately to easily write the exported data into corresponding InfluxDB Clustered databases.
Export all data in a database and retention policy to a file
influx_inspect export \ -lponly \ -database example-db \ -retention example-rp \ -out path/to/export-file.lp
View more export command examples:
Create InfluxDB Clustered databases for each InfluxDB 1.x database and retention policy combination.
If coming from InfluxDB v1, the concepts of databases and retention policies have been combined into a single concept–database. Retention policies are no longer part of the InfluxDB data model. However, InfluxDB Clustered does support InfluxQL, which requires databases and retention policies. See InfluxQL DBRP naming convention.
If coming from InfluxDB v2, InfluxDB Cloud (TSM), or InfluxDB Cloud Serverless, database and bucket are synonymous.
Provide the following arguments:
- (Optional) Database retention period (default is infinite)
- Database name (see Database naming restrictions)
influxctl database create --retention-period 30d <DATABASE_NAME>
To learn more about databases in InfluxDB Clustered, see Manage databases.
Create a database token for writing to your InfluxDB Clustered database.
Provide the following:
- Permission grants
--read-database: Grants read access to a database
--write-databaseGrants write access to a database
- Token description
influxctl token create \ --read-database example-db \ --write-database example-db \ "Read/write token for example-db database"
- Permission grants
Write the exported line protocol to your InfluxDB cluster.
Use the v1 API or v2 API endpoints to write data to your InfluxDB cluster.
Choose from the following options:
- The v1 API
/writeendpoint with v1 client libraries or HTTP clients.
- The v2 API
/api/v2/writeendpoint with v2 client libraries or HTTP clients.
Write each export file to the target database.
v2.x influx CLI not supported
Don’t use the
influxCLI with InfluxDB Clustered. While it may coincidentally work, it isn’t officially supported.
For help finding the best workflow for your situation, contact Support.
- The v1 API
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.