Documentation

Restore a Chronograf database

Chronograf uses Bolt to store Chronograf-specific key-value data. Generally speaking, you should never have to manually administer your internal Chronograf database. However, rolling back to a previous version of Chronograf does require restoring the data and data-structure specific to that version.

Chronograf’s internal database, chronograf-v1.db, is stored at your specified --bolt-path which, by default, is the current working directory where the chronograf binary is executed. In the upgrade process, an unmodified backup of your Chronograf data is stored inside the backup directory before any necessary migrations are run. This is done as a convenience in case issues arise with the data migrations or the upgrade process in general.

The backup directory contains a copy of your previous chronograf-v1.db file. Each backup file is appended with the corresponding Chronograf version. For example, if you moved from Chronograf 1.4.4.2 to 1.10.2, there will be a file called backup/chronograf-v1.db.1.4.4.2.

Chronograf backup directory structure

  • chronograf-working-dir/
    • chronograf-v1.db
    • backup/
      • chronograf-v1.db.1.4.4.0
      • chronograf-v1.db.1.4.4.1
      • chronograf-v1.db.1.4.4.2

Roll back to a previous version

If there is an issue during the upgrade process or you simply want/need to roll back to an earlier version of Chronograf, you must restore the data file associated with that specific version, then downgrade and restart Chronograf.

The process is as follows:

1. Locate your desired backup file

Inside your backup directory, locate the database file with a the appended Chronograf version that corresponds to the version to which you are rolling back. For example, if rolling back to 1.4.4.2, find backup/chronograf-v1.db.1.4.4.2.

2. Stop your Chronograf server

Stop the Chronograf server by killing the chronograf process.

3. Replace your current database with the backup

Remove the current database file and replace it with the desired backup file:

# Remove the current database
rm chronograf-v1.db

# Replace it with the desired backup file
cp backup/chronograf-v1.db.1.4.4.2 chronograf-v1.db

4. Install the desired Chronograf version

Install the desired Chronograf version. Chronograf releases can be viewed and downloaded either from the InfluxData downloads page or from the Chronograf releases page on Github.

5. Start the Chronograf server

Restart the Chronograf server. Chronograf will use the chronograf-v1.db in the current working directory.

Rerun update migrations

This process can also be used to rerun Chronograf update migrations. Go through steps 1-5, but on step 3 select the backup you want to use as a base for the migrations. When Chronograf starts again, it will automatically run the data migrations required for the installed version.


Was this page helpful?

Thank you for your feedback!


Introducing InfluxDB Clustered

A highly available InfluxDB 3.0 cluster on your own infrastructure.

InfluxDB Clustered is a highly available InfluxDB 3.0 cluster built for high write and query workloads on your own infrastructure.

InfluxDB Clustered is currently in limited availability and is only available to a limited group of InfluxData customers. If interested in being part of the limited access group, please contact the InfluxData Sales team.

Learn more
Contact InfluxData Sales

The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Flux is going into maintenance mode and will not be supported in InfluxDB 3.0. This was a decision based on the broad demand for SQL and the continued growth and adoption of InfluxQL. We are continuing to support Flux for users in 1.x and 2.x so you can continue using it with no changes to your code. If you are interested in transitioning to InfluxDB 3.0 and want to future-proof your code, we suggest using InfluxQL.

For information about the future of Flux, see the following: