Migrate InfluxDB OSS instances to InfluxDB Enterprise clusters
- An InfluxDB OSS instance running InfluxDB 1.7.10 or later.
- An InfluxDB Enterprise cluster running InfluxDB Enterprise 1.7.10 or later
- Network accessibility between the OSS instances and all data and meta nodes.
Migrating does the following:
- Deletes data in existing InfluxDB Enterprise data nodes
- Transfers all users from the OSS instance to the InfluxDB Enterprise cluster
- Requires downtime for the OSS instance
To migrate to InfluxDB Enterprise
Complete the following tasks:
- Set up InfluxDB Enterprise meta nodes
- Upgrade the InfluxDB binary on your OSS instance
- Rebalance the cluster
Upgrade InfluxDB to the latest version
Upgrade InfluxDB to the latest stable version before proceeding.
Set up all meta nodes in your InfluxDB Enterprise cluster. For information about installing and setting up meta nodes, see Install meta nodes.
Add the OSS instance to the meta /etc/hosts files
When modifying the file on each meta node, include the IP and host name of your InfluxDB OSS instance so meta nodes can communicate with the OSS instance.
Set up InfluxDB Enterprise data nodes
If you don’t have any existing data nodes in your InfluxDB Enterprise cluster, skip to the next step.
Remove the data node from the InfluxDB Enterprise cluster
From a meta node in your InfluxDB Enterprise cluster, run:
Delete existing data
On each data node dropped from the cluster, run:
sudo rm -rf /var/lib/influxdb/{meta,data,hh}
Recreate data directories
On each data node dropped from the cluster, run:
sudo mkdir /var/lib/influxdb/{data,hh,meta}
Ensure file permissions are correct
sudo chown -R influxdb:influxdb /var/lib/influxdb
Update the
/etc/hosts
fileOn each data node, add the IP and hostname of the OSS instance to the
/etc/hosts
file to allow the data node to communicate with the OSS instance.
Upgrade the InfluxDB OSS instance to InfluxDB Enterprise
- Stop all writes to the InfluxDB OSS instance
Stop the
influxdb
service on the InfluxDB OSS instancesudo service influxdb stop
sudo systemctl stop influxdb
Double check that the service is stopped. The following command should return nothing:
Remove the InfluxDB OSS package
sudo apt-get remove influxdb
sudo yum remove influxdb
Back up your InfluxDB OSS configuration file
If you have custom configuration settings for InfluxDB OSS, back up and save your configuration file. Without a backup, you’ll lose custom configuration settings when updating the InfluxDB binary.
Update the InfluxDB binary
wget https://dl.influxdata.com/enterprise/releases/influxdb-data_1.8.2-c1.8.2_amd64.deb
sudo dpkg -i influxdb-data_1.8.2-c1.8.2_amd64.deb
sudo yum localinstall influxdb-data-1.8.2-c1.8.2.x86_64.rpm
Update the configuration file
hostname
to the full hostname of the data nodelicense-key
in the[enterprise]
section to the license key you received on InfluxPortal ORlicense-path
in the[enterprise]
section to the local path to the JSON license file you received from InfluxData.The
license-key
andlicense-path
settings are mutually exclusive and one must remain set to an empty string.
# Hostname advertised by this host for remote addresses.
# This must be accessible to all nodes in the cluster.
hostname="<data-node-hostname>"
[enterprise]
# license-key and license-path are mutually exclusive,
# use only one and leave the other blank
license-key = "<your_license_key>"
license-path = "/path/to/readable/JSON.license.file"
Transfer any custom settings from the backup of your OSS configuration file to the new Enterprise configuration file.
Update the
/etc/hosts
fileAdd all meta and data nodes to the
/etc/hosts
file to allow the OSS instance to communicate with other nodes in the InfluxDB Enterprise cluster.Start the data node
sudo systemctl start influxdb
After you upgrade your OSS instance to InfluxDB Enterprise, add the node to your Enterprise cluster.
From a meta node in the cluster, run:
influxd-ctl add-data <new-data-node-hostname>:8088
It should output:
Added data node y at new-data-node-hostname:8088
Add existing data nodes back to the cluster
If you removed any existing data nodes from your InfluxDB Enterprise cluster, add them back to the cluster.
From a meta node in the InfluxDB Enterprise cluster, run the following for each data node:
influxd-ctl add-data <the-hostname>:8088
It should output:
Added data node y at the-hostname:8088
Once added to the cluster, InfluxDB synchronizes data stored on the upgraded OSS node with other data nodes in the cluster. It may take a few minutes before the existing data is available.
Rebalance the cluster
- Use the ALTER RETENTION POLICY statement to increase the on all existing retention polices to the number of data nodes in your cluster.
- Rebalance your cluster manually to meet the desired replication factor for existing shards.