content/enterprise_influxdb/v1/administration/upgrading.md
To successfully perform a rolling upgrade of InfluxDB Enterprise clusters to {{< latest-patch >}}, complete the following steps:
Note: A rolling upgrade lets you update your cluster with zero downtime. To downgrade to an earlier version, complete the following procedures, replacing the version numbers with the version that you want to downgrade to.
Before performing an upgrade, create a full backup of your InfluxDB Enterprise cluster. Also, if you create incremental backups, trigger a final incremental backup.
Note: For information on performing a final incremental backup or a full backup, see Back up and restore InfluxDB Enterprise clusters.
Complete the following steps to upgrade meta nodes:
influxdb-meta service.wget https://dl.influxdata.com/enterprise/releases/influxdb-meta_{{< latest-patch >}}-c{{< latest-patch >}}-1_amd64.deb
wget https://dl.influxdata.com/enterprise/releases/influxdb-meta-{{< latest-patch >}}_c{{< latest-patch >}}-1.x86_64.rpm
sudo dpkg -i influxdb-meta_{{< latest-patch >}}-c{{< latest-patch >}}-1_amd64.deb
sudo yum localinstall influxdb-meta-{{< latest-patch >}}-c{{< latest-patch >}}-1.x86_64.rpm
Migrate any custom settings from your previous meta node configuration file.
To enable HTTPS, you must update the meta node configuration file (influxdb-meta.conf). For information, see Enable HTTPS within the configuration file for each Meta Node.
influxdb-meta serviceservice influxdb-meta restart
sudo systemctl restart influxdb-meta
After upgrading all meta nodes, check your node version numbers using the
influxd-ctl show command.
The influxd-ctl utility is available on all meta nodes.
~# influxd-ctl show
Data Nodes
==========
ID TCP Address Version
4 rk-upgrading-01:8088 1.8.x_c1.8.y
5 rk-upgrading-02:8088 1.8.x_c1.8.y
6 rk-upgrading-03:8088 1.8.x_c1.8.y
Meta Nodes
==========
TCP Address Version
rk-upgrading-01:8091 {{< latest-patch >}}-c{{< latest-patch >}} # {{< latest-patch >}}-c{{< latest-patch >}} = 👍
rk-upgrading-02:8091 {{< latest-patch >}}-c{{< latest-patch >}}
rk-upgrading-03:8091 {{< latest-patch >}}-c{{< latest-patch >}}
Ensure that the meta cluster is healthy before upgrading the data nodes.
Complete the following steps to upgrade data nodes:
influxdb service.To stop traffic to data nodes, do one of the following:
Disable traffic to data nodes in the node balancer
{{% note %}} Disabling traffic to a data node in the load balancer still allows other data node in the cluster to write to current data node. {{% /note %}}
Stop the influxdb service on the data node
{{< code-tabs-wrapper >}} {{% code-tabs %}} sysvinit systemd {{% /code-tabs %}} {{% code-tab-content %}}
service influxdb stop
{{% /code-tab-content %}} {{% code-tab-content %}}
sudo systemctl stop influxdb
{{% /code-tab-content %}} {{< /code-tabs-wrapper >}}
{{% note %}}
Stopping the influxdb process the data node takes longer than disabling
traffic at the load balancer, but it ensures all writes stop, including writes
from other data nodes in the cluster.
{{% /note %}}
wget https://dl.influxdata.com/enterprise/releases/influxdb-data_{{< latest-patch >}}-c{{< latest-patch >}}-1_amd64.deb
wget https://dl.influxdata.com/enterprise/releases/influxdb-data-{{< latest-patch >}}_c{{< latest-patch >}}-1.x86_64.rpm
When you run the install command, you're prompted to keep or overwrite your
current configuration file with the file for version {{< latest-patch >}}.
Enter N or O to keep your current configuration file.
You'll make the configuration changes for version {{< latest-patch >}} in the
next procedure, Update the data node configuration file.
sudo dpkg -i influxdb-data_{{< latest-patch >}}-c{{< latest-patch >}}-1_amd64.deb
sudo yum localinstall influxdb-data-{{< latest-patch >}}-c{{< latest-patch >}}.x86_64.rpm
Migrate any custom settings from your previous data node configuration file.
To enable HTTPS, see Enable HTTPS within the configuration file for each Data Node.
To enable TSI, open /etc/influxdb/influxdb.conf, and then adjust and save the settings shown in the following table.
| Section | Setting |
|---|---|
[data] | <ul><li>To use Time Series Index (TSI) disk-based indexing, add index-version = "tsi1" <li>To use TSM in-memory index, add index-version = "inmem" <li>Add wal-fsync-delay = "0s" <li>Add max-concurrent-compactions = 0<li>Setcache-max-memory-size to 1073741824 |
[cluster] | <ul><li>Add pool-max-idle-streams = 100 <li>Addpool-max-idle-time = "1m0s" <li>Remove max-remote-write-connections |
[anti-entropy] | <ul><li>Add enabled = true <li>Add check-interval = "30s" <li>Add max-fetch = 10 |
[admin] | Remove entire section. |
For more information about TSI, see TSI overview and TSI details.
Complete the following steps for Time Series Index (TSI) only.
Delete all _series directories in the /data directory (by default, stored at /data/<dbName>/_series).
Delete all TSM-based shard index directories (by default, located at /data/<dbName/<rpName>/<shardID>/index).
Use the influx_inspect buildtsi utility to rebuild the TSI index. For example, run the following command:
influx_inspect buildtsi -datadir /yourDataDirectory -waldir /wal
Replacing yourDataDirectory with the name of your directory. Running this command converts TSM-based shards to TSI shards or rebuilds existing TSI shards.
Note: Run the
buildtsicommand using the same system user that runs theinfluxdservice, or a user with the same permissions.
influxdb serviceRestart the influxdb service to restart the data nodes.
Do one of the following:
If the influxdb service is still running, but isn't receiving traffic from the load balancer:
{{< code-tabs-wrapper >}} {{% code-tabs %}} sysvinit systemd {{% /code-tabs %}} {{% code-tab-content %}}
service influxdb restart
{{% /code-tab-content %}} {{% code-tab-content %}}
sudo systemctl restart influxdb
{{% /code-tab-content %}} {{< /code-tabs-wrapper >}}
If the influxdb service is stopped:
{{< code-tabs-wrapper >}} {{% code-tabs %}} sysvinit systemd {{% /code-tabs %}} {{% code-tab-content %}}
service influxdb start
{{% /code-tab-content %}} {{% code-tab-content %}}
sudo systemctl start influxdb
{{% /code-tab-content %}} {{< /code-tabs-wrapper >}}
Restart routing read and write requests to the data node server (port 8086) through your load balancer.
Note: Allow the hinted handoff queue (HHQ) to write all missed data to the updated node before upgrading the next data node. Once all data has been written, the disk space used in the hinted handoff queue should be 0. Check the disk space on your hh directory by running the [
du] command, for example,du /var/lib/influxdb/hh.
After upgrading all data nodes, check your node version numbers using the
influxd-ctl show command.
The influxd-ctl utility is available on all meta nodes.
~# influxd-ctl show
Data Nodes
==========
ID TCP Address Version
4 rk-upgrading-01:8088 {{< latest-patch >}}-c{{< latest-patch >}} # {{< latest-patch >}}-c{{< latest-patch >}} = 👍
5 rk-upgrading-02:8088 {{< latest-patch >}}-c{{< latest-patch >}}
6 rk-upgrading-03:8088 {{< latest-patch >}}-c{{< latest-patch >}}
Meta Nodes
==========
TCP Address Version
rk-upgrading-01:8091 {{< latest-patch >}}-c{{< latest-patch >}}
rk-upgrading-02:8091 {{< latest-patch >}}-c{{< latest-patch >}}
rk-upgrading-03:8091 {{< latest-patch >}}-c{{< latest-patch >}}
If you have any issues upgrading your cluster, contact InfluxData support.