Upgrade from InfluxDB 1.x to InfluxDB 2.0

Docker users

We are working on the upgrade process to ensure a smooth upgrade from InfluxDB 1.x to InfluxDB 2.0 on Docker. If you’re upgrading from InfluxDB 1.x on Docker, we recommend waiting to upgrade until we finalize an updated Docker release given the current process is undefined.

Specifically, the upgrade process does the following:

  1. Reads the existing InfluxDB 1.x configuration file and generates an equivalent InfluxDB 2.0 configuration file at ~/.influxdbv2/config.toml.
  2. Upgrades metadata and storage engine paths to ~/.influxdbv2/meta and ~/.influxdbv2/engine, respectively (unless otherwise specified).
  3. Writes existing data and write ahead log (WAL) files into InfluxDB 2.0 buckets.
  4. Creates required to query data with InfluxQL.
  5. Reads existing metadata and migrates non-admin users, passwords, and permissions into a 1.x authorization–compatible store within ~/influxdbv2/influxdb.bolt.

When starting InfluxDB 2.0 after running , InfluxDB must build a new time series index (TSI). Depending on the volume of data present, this may take some time.

Before upgrading to InfluxDB 2.0, consider the following guidelines. Some or all might apply to your specific installation and use case. The sections below contain our recommendations for addressing possible gaps in the upgrade process. Consider whether you need to address any of the following before upgrading.

InfluxDB 2.0 requires 64-bit operating systems.

InfluxDB 2.0 is currently available for macOS and Linux. Docker images, ARM builds, and Windows builds are not currently available, but are planned for subsequent releases.

Continuous queries

Continuous queries are replaced by tasks in InfluxDB 2.0. To convert continuous queries to InfluxDB tasks, see Migrate continuous queries to tasks.

Kapacitor

You can continue to use Kapacitor with InfluxDB OSS 2.0 under the following scenarios:

  • Kapacitor Batch-style TICKscripts work with the 1.x read compatible API. Existing Kapacitor user credentials should continue to work using the 1.x compatibility API.
  • InfluxDB 2.0 has no subsriptions API and does not support Kapacitor stream tasks. To continue using stream tasks, write data directly to both InfluxDB and Kapacitor. Use Telegraf and its to write to Kapacitor and the InfluxDB v2 output plugin to write to InfluxDB v2.
Example Telegraf configuration

influxd upgrade migrates existing 1.x users and their permissions. However, it does not migrate administrative users.

To review users with admin permissions, in the InfluxDB 1.x CLI, run show users. Any users labeled “admin” will not be migrated.

If using an admin user for visualization or Chronograf’s administrative functions, create a new read-only user before upgrading. Admin rights are granted to the primary user created in the InfluxDB 2.0 setup process which runs at the end of the upgrade process. This provides you with the opportunity to re-assess who should be granted admin-level access in your InfluxDB 2.0 setup.

Dashboards

You can continue to use your existing dashboards and visualization tools with InfluxDB 2.0 via the . The upgrade process creates DBRP mappings to ensure existing users can execute InfluxQL queries with the appropriate permissions.

However, if your dashboard tool is configured using a user with admin permissions, you will need to create a new read-only user with the appropriate database permissions before upgrading. This new username and password combination should be used within the data source configurations to continue to provide read-only access to the underlying data.

Ensure your dashboards are all functioning before upgrading.

Secure by default

InfluxDB 2.0 requires authentication and does not support the InfluxDB 1.x configuration option. Consider enabling authentication in your InfluxDB 1.x instance before upgrading to InfluxDB 2.0 to ensure the appropriate credentials are in place and that the various applications, agents, and visualization tools are able to connect.

If you’ve considered the and are ready to proceed, follow these steps to upgrade your InfluxDB 1.x to InfluxDB 2.0.

  1. Download InfluxDB OSS 2.0. Unpackage the InfluxDB binaries and place them in your $PATH.
  2. Stop your running InfluxDB 1.x instance. Make a backup copy of all 1.x data before upgrading:

  3. Use influxd version to ensure you are running InfluxDB 2.0 from the command line. The influxd upgrade command is only available in InfluxDB 2.0.

  4. If your 1.x configuration file is at the , run:

    If your 1.x configuration file is not at the default location, run:

For more information on upgrading, see the reference documentation.