Cloning an InfluxDB Instance with all Users/Token/etc

Hi,

I have a running InfluxDB Instance installed locally, which is receiving data from multiple Telegraf instances. I’m now looking to clone this instance to a docker container, including all Users, tokens and data. The goal is to shut down the influx instance which is running locally and boot up the docker container with the cloned instance, so for everyone writing to or reading from the instance, everything stays the same.
Is there a way to achieve this? I tried using the influx backup and influx restore commands, but they are only cloning the buckets and data, not the users and tokens.
Any help is appreciated!

Thanks!

Hello @brimstone,
I don’t think there’s a way to clone the tokens.
I’m surprised users aren’t backed up.
Did you use:

Thanks!

Hi,
thanks for the answer. I used the backup command described in the docs article you linked to; maybe the users were backed up but I didn’t realized it (I stopped looking for which data is restored after I’ve seen the empty tokens tab since this was my top priority :smile:). I’m going to restore the backup again and look for the users specifically.
For anyone interested in the best way to switch from a local to a docker instance: I will try to set up a docker instance of InfluxDB with a shared Volume and an alternative port exposed. With the backup & restore commands, I’ll get the data itself and configure the rest manually (adding Tokens with docker exec and this influx command). I’ll switch the exposed ports of the local and docker instance when I’m done with configuring.