Backup and restore influxdb inside Docker


A few people have had trouble using backup and restore of influxdb inside Docker, so I wrote a small script demonstrating how to back up and restore a database, in this gist. If you’ve had trouble with backup and restore inside Docker, you should be able to use that script as a reference to make backup and restore work in your setup.

Some of the issues people are running into include:

  • Trying to run influxd restore without stopping the influxd process
  • General difficulties around influxdb inside Docker, particularly:
    • Stopping the influxd process which kills the container
    • Needing to restore into a volume from an ephemeral container

We’re looking into how to make this workflow easier. Right now, it seems like the most user-friendly answer will be to allow influxd restore to run correctly without stopping the influxd process, but we are still considering whether any other approaches make sense.