Skip to content

influxdata/influxdb-v1-to-v2

Repository files navigation

influxdb-v1-to-v2

WIP migration of database metadata from InfluxDB v1 to InfluxDB v2.

Usage

Run yarn in this directory to install the required dependencies, you can also use npm install to do the same. The tools are shown to run with yarn, you can use npm run in place of it. npm (unlike yarn) is installed together with node.js.

Create v2 buckets out of v1 databases, maps v1 users to v2 authorizations

  1. yarn influxdb-v1-to-v2 --help shows help with default and required options, run yarn influxdb-v1-to-v2 with required parameters specified either in environment variables or in command-line options
  2. observe console to see that
    • buckets are created for each database/retention policy pair
    • DBRP mappings are created in v2 to map v1 db/rp pairs to v2 buckets; this mapping is required for v1 API queries/writes to work properly
    • when --with-users option is specified
      • v1 authorizations are created in v2 and maps v1 user grants (excluding admin users) to created v2 buckets
      • user password cannot be migrated, use --out-users option to create file that you can later use to setup user passwords with set-passwords utility

Set passwords for migrated users

  1. modify users file created in the previous step with --out-users options, specify password for each paricular user in the file, or rely upon default password later specified with the --password option
  2. yarn set-password --help shows help with default and required options
    • --users-file and InfluxDB v2 connection options are required
  3. run yarn set-password with required parameters specified either in environment variables or in command-line options
  4. observe console to see how/whether passwords are set

About

Migrates database metadata from InfluxDB v1 to InfluxDB v2

Resources

Stars

Watchers

Forks

Packages

No packages published