Documentation

Migrate InfluxDB OSS instances to InfluxDB Enterprise clusters

Migrate a running instance of InfluxDB open source (OSS) to an InfluxDB Enterprise cluster.

Migration transfers all users from the OSS instance to the InfluxDB Enterprise cluster.

Migrate an OSS instance to InfluxDB Enterprise

Complete the following tasks to migrate data from OSS to an InfluxDB Enterprise cluster without downtime or missing data.

  1. Upgrade InfluxDB OSS and InfluxDB Enterprise to the latest stable versions.

  2. On each meta node and each data node, add the IP and hostname of your OSS instance to the /etc/hosts file. This will allow the nodes to communicate with the OSS instance.

  3. On the OSS instance, take a portable backup from OSS using the influxd backup command with the -portable flag:

    influxd backup -portable -host <IP address>:8088 /tmp/mysnapshot
    

    Note the current date and time when you take the backup. For more information, see influxd backup.

  4. Restore the backup on the cluster by running the following:

    influxd-ctl restore <path-to-backup-files>
    

    Note: InfluxDB Enterprise uses the influxd-ctl utility to back up and restore data. For more information, see influxd-ctl and restore.

  5. To avoid data loss, dual write to both OSS and Enterprise while completing the remaining steps. This keeps the OSS and cluster active for testing and acceptance work. For more information, see Write data with the InfluxDB API.

  6. Export data from OSS from the time the backup was taken to the time the dual write started. For example, if you take the backup on 2020-07-19T00:00:00.000Z, and started writing data to Enterprise at 2020-07-19T23:59:59.999Z, you would run the following command:

    influx_inspect export -compress -start 2020-07-19T00:00:00.000Z -end 2020-07-19T23:59:59.999Z`
    

    For more information, see -export.

  7. Import data into Enterprise.

  8. Verify data is successfully migrated to your Enterprise cluster. See:

Next, stop writes to OSS instance, and remove it.

Stop writes and remove OSS

  1. Stop all writes to the InfluxDB OSS instance.

  2. Stop the influxdb service on the InfluxDB OSS instance server.

    sudo service influxdb stop
    
    sudo systemctl stop influxdb
    
    1. Double check that the service is stopped. The following command should return nothing:
    ps ax | grep influxd
    
  3. Remove the InfluxDB OSS package.

    sudo apt-get remove influxdb
    
    sudo yum remove influxdb
    

Rebalance the cluster

  1. Use the ALTER RETENTION POLICY statement to increase the replication factor on all existing retention polices to the number of data nodes in your cluster.
  2. Rebalance your cluster manually to meet the desired replication factor for existing shards.
  3. If you were using Chronograf, add your Enterprise instance as a new data source.

Was this page helpful?

Thank you for your feedback!


Introducing InfluxDB Clustered

A highly available InfluxDB 3.0 cluster on your own infrastructure.

InfluxDB Clustered is a highly available InfluxDB 3.0 cluster built for high write and query workloads on your own infrastructure.

InfluxDB Clustered is currently in limited availability and is 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.

Learn more
Contact InfluxData Sales

The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Flux is going into maintenance mode and will not be supported in InfluxDB 3.0. This was a decision based on the broad demand for SQL and the continued growth and adoption of InfluxQL. We are continuing to support Flux for users in 1.x and 2.x so you can continue using it with no changes to your code. If you are interested in transitioning to InfluxDB 3.0 and want to future-proof your code, we suggest using InfluxQL.

For information about the future of Flux, see the following: