I’m new to InfluxDB and have V2 running in a docker container successfully for a few days. I’d like to back up my data but I’m struggling to understand what the output is telling me.
2021-01-16T10:22:31.585015Z info Backing up KV store {"log_id": "0RjgKdd0000", "path": "20210116T102231Z.bolt"}
Error: Read:authorizations is unauthorized.
See 'influx backup -h' for help
I see that a directory /var/lib/influxdb/backup is created which contains one empty .bolt file:
-rw-r--r-- 1 root root 0 Jan 16 10:22 20210116T102231Z.bolt
The docs that I’ve read aren’t very clear on how authorisation works other than providing a token. The token I’ve used is an ‘all-access’ token for my org.
Using CLI version: Influx CLI 2.0.3 (git: fe04d346df) build_date: 2020-12-15T01:00:16Z
DB version: Version 2.0.3 (fe04d34)
Hello @tanc ,
Hmm that’s odd I. would expect that to work. Are you using the root authorization token the token created for the first user in the InfluxDB setup process?
Thanks for responding @Anaisdg . It turns out this was a newbie error, I had installed Influxdb 2.0 but mistakenly followed a guide for using 1.8 in Docker and had bind mounted the wrong directory. It turns out my bolt file and associated databases were all in the container’s /root/.influxdbv2 directory and I was querying against what was possibly an old an empty db from a previous 1.8 install.
docker-compose exec influxdb influx backup influxdb-backup -t xxx
2021-04-22T22:14:06.631863Z info Backing up KV store {"log_id": "0TfvCY9G000", "path": "20210422T221406Z.bolt"}
Error: Read:authorizations is unauthorized.
See 'influx backup -h' for help
Dear, I checked all my installing process, I don’t remember there’s step to create the " root authorization token", also can not find in the help, could you give some clear explaination or how re-create it?
It looks like there has not been any response to this. I am in the same situation. Recently I had to re-install my influx, and I did not node down my root authorization token. Does it mean that it is all lost now and there is no way of retrieving it? And my influx database is useless from now on?
@nygma2004 If you are able to get to your bolt file you can find the API key for the root user there. Made the same mistake and was able to get backups working once I snagged the API key from that file.
you should be able to find your username in the file then look for the api key afterwards. if you search for “key” in the file you should be able to narrow it down - they all end with a “==”
so look for that shortly after your username.