docs-v2/content/influxdb/v1.6/administration/upgrading.md

5.4 KiB

title menu
Upgrading to InfluxDB 1.6.x
influxdb_1_6
name weight parent
Upgrading 25 Administration

Upgrading InfluxDB 1.3 / 1.4 (no TSI Preview) to 1.6.x (TSI enabled)

Starting with the InfluxDB 1.6 release, enabling Time Series Index (TSI) is recommended for all customers. To learn more about TSI, see:

The upgrade steps below guide you in upgrading InfluxDB OSS and InfluxDB Enterprise, enabling TSI functionality.

Note: For the InfluxDB 1.6 release, the default continues to use TSM-based shards as in earlier versions, with in-memory indexes.

To upgrade from 1.4 (no TSI Preview) to 1.6.x (TSI enabled):

Follow these steps to upgrade an earlier InfluxDB instance (versions 1.0 to 1.4) that did not enable the TSI Preview to an InfluxDB 1.6 instance with Time Series Index (TSI) enabled.

  1. Download InfluxDB version 1.6.x and install the upgrade.

  2. Update your InfluxDB configuration.

  • If using the InfluxDB configuration file, migrate your InfluxDB configuration file customizations to the InfluxDB 1.6 configuration file.
  • Add, or modify, your environment variables.
  • Migrate configuration file customizations in your InfluxDB 1.4 configuration file to the InfluxDB 1.6.x configuration file
  • Add environment variables, if desired.
  1. Enable the Time Series Index (TSI).
  • If using the InfluxDB configuration file, find the [data] section, uncomment index-version = "inmem"' and change the value totsi1`.

    • Example: `index-version = "tsi1"'
  • If using environment variables, set INFLUXDB_DATA_INDEX_VERSION to tsi1.

    • Example: export INFLUXDB_DATA_INDEX_VERSION="tsi1"
  1. Convert existing TSM-based shards to TSI-supported shards.
  1. Restart the influxdb service.

Upgrading InfluxDB 1.3 - 1.4 (TSI Preview enabled) to 1.6.x (TSI enabled)

Follow these steps to upgrade an earlier InfluxDB instance (versions 1.3 and 1.4) that had the TSI Preview enabled to an InfluxDB 1.6 instance with Time Series Index (TSI) enabled.

  1. Download InfluxDB version 1.6 and install the upgrade.

  2. Update your InfluxDB configuration.

  • If using the InfluxDB configuration file, migrate your InfluxDB configuration file customizations to the InfluxDB 1.6 configuration file.
  • Add, or modify, your environment variables.
  1. Enable the Time Series Index (TSI).
  • If using the InfluxDB configuration file, find the [data] section, uncomment index-version = "inmem", and change the value to tsi1.

    • Example: index-version = "tsi1"
  • If using an environment variable, set INFLUXDB_DATA_INDEX_VERSION to tsi1.

    • Example: export INFLUXDB_DATA_INDEX_VERSION=tsi1
  1. Delete all existing TSM-based shard index directories.
  • Removing the existing index directories ensures there are no incompatible index files.
  • By default, the index directories are located at /<shard_ID>/index.
    • Example: /2/index
  1. Convert existing shards to support TSI.
  • When Time Series Index (TSI) is enabled, new shards use the TSI index. Existing shards must be converted to support TSI.
  • Run the influx_inspect buildtsi command to convert existing TSM-based shards to TSI-based shards.
  1. Restart the influxdb service.

Upgrading InfluxDB 1.0 - 1.4 to 1.6.x

Follow these steps to upgrade an earlier InfluxDB instance (versions 1.0 to 1.4) using the default TSM in-memory indexing to an InfluxDB 1.6 instance.

  1. Download InfluxDB 1.6.

  2. Install InfluxDB 1.6.

  3. Update your InfluxDB configuration.

  • If using the InfluxDB configuration file, migrate your InfluxDB configuration file customizations to the InfluxDB 1.6 configuration file.
  • Add, or modify, your environment variables.
  1. Restart the influxdb service.

Switching between TSM and TSI indexes

After installing and upgrading to InfluxDB 1.6, you can switch between using the TSM index and the TSI index if needed.

Switching from TSM index to TSI index:

  1. Enable TSI.
  2. Convert TSM-based shards to TSI-based shards.
  3. Restart the influxdb service.

Switching from disk TSI index to TSM index:

  1. Enable inmem.
  2. Delete all shard index directories.
  3. Restart the influxdb service.

Upgrading InfluxDB Enterprise clusters

See Upgrading InfluxDB Enterprise clusters.