---
title: Migrate data from InfluxDB OSS to other InfluxDB instances
description: To migrate data from an InfluxDB OSS bucket to another InfluxDB OSS or InfluxDB Cloud bucket, export your data as line protocol and write it to your other InfluxDB bucket.
url: https://docs.influxdata.com/influxdb/v2/write-data/migrate-data/migrate-oss/
estimated_tokens: 771
product: InfluxDB OSS v2
version: v2
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb/v2/write-data/migrate-data/migrate-oss/
date: '2025-04-02T15:54:32-06:00'
lastmod: '2025-04-02T15:54:32-06:00'
---

This page documents an earlier version of InfluxDB OSS.[InfluxDB 3 Core](/influxdb3/core/) is the latest stable version.

#### API token hashing is enabled by default in InfluxDB OSS 2.9.0

Stronger token security: tokens are stored as hashes on disk, so a
copy of the database file doesn’t expose usable tokens. Existing
tokens are hashed on first startup and the original strings can’t
be recovered afterward — **capture any plaintext tokens you still
need before you upgrade**.

For more information, see [Token hashing](/influxdb/v2/admin/tokens/#token-hashing).

To migrate data from an InfluxDB OSS bucket to another InfluxDB OSS or InfluxDB
Cloud bucket, export your data as line protocol and write it to your other
InfluxDB bucket.

#### InfluxDB Cloud write limits

If migrating data from InfluxDB OSS to InfluxDB Cloud, you are subject to your[InfluxDB Cloud organization’s rate limits and adjustable quotas](/influxdb/cloud/account-management/limits/).
Consider exporting your data in time-based batches to limit the file size
of exported line protocol to match your InfluxDB Cloud organization’s limits.

1. [Find the InfluxDB OSS bucket ID](/influxdb/v2/organizations/buckets/view-buckets/)that contains data you want to migrate.

2. Use the `influxd inspect export-lp` command to export data in your bucket as[line protocol](/influxdb/v2/reference/syntax/line-protocol/).
   Provide the following:

   * **bucket ID**: (Required) ID of the bucket to migrate.
   * **engine path**: (Required) Path to the TSM storage files on disk.
     The default engine path [depends on your operating system](/influxdb/v2/reference/internals/file-system-layout/#file-system-layout),
     If using a [custom engine-path](/influxdb/v2/reference/config-options/#engine-path)provide your custom path.
   * **output path**: (Required) File path to output line protocol to.
   * **start time**: Earliest time to export.
   * **end time**: Latest time to export.
   * **measurement**: Export a specific measurement. By default, the command
     exports all measurements.
   * **compression**: (Recommended)
     Use Gzip compression to compress the output line protocol file.

   ```
   influxd inspect export-lp \
     --bucket-id 12ab34cd56ef \
     --engine-path ~/.influxdbv2/engine \
     --output-path path/to/export.lp
     --start 2022-01-01T00:00:00Z \
     --end 2022-01-31T23:59:59Z \
     --compress
   ```

3. Write the exported line protocol to your InfluxDB OSS or InfluxDB Cloud instance.

   Do any of the following:

   * Write line protocol in the **InfluxDB UI**:
     * [InfluxDB Cloud UI](/influxdb/cloud/write-data/no-code/load-data/#load-csv-or-line-protocol-in-ui)
     * [InfluxDB OSS 2.9 UI](/influxdb/v2/write-data/no-code/load-data/#load-csv-or-line-protocol-in-ui)

   * [Write line protocol using the `influx write` command](/influxdb/v2/reference/cli/influx/write/)
   * [Write line protocol using the InfluxDB API](/influxdb/v2/write-data/developer-tools/api/)
   * [Bulk ingest data (InfluxDB Cloud)](/influxdb/cloud/write-data/bulk-ingest-cloud/)
