I am trying to backup influxdb 2 but get the usual error that has been discussed many times here with no solution.
INFO: Downloading metadata snapshot
Error: failed to backup metadata: failed to download metadata snapshot: 401 Unauthorized: read:authorizations is unauthorized
I found a token called admin by running “influx auth list -t ” but that does not work for the backup command, is there really no progress on this continually recurring issue?
Hello @HenrysCat,
I understand your frustration with the 401 Unauthorized error when trying to back up InfluxDB 2. This is a common issue that many users encounter :(.
The key issue here is that you need to use a token with operator-level permissions (also called a “root authorization token”). This is typically the token that was created during the initial setup process of InfluxDB, not just any admin token.
Have you tried the following? :
Use the root/operator token: The backup command requires “the root authorization token (the token created for the first user in the InfluxDB setup process)” as seen in the InfluxDB backup documentation.
influxd recovery auth create-operator \
--org esp8266 \
--username admin
WARN[0000]log.go:228 gosnowflake.(*defaultLogger).Warn DBUS_SESSION_BUS_ADDRESS envvar looks to be not set, this can lead to runaway dbus-daemon processes. To avoid this, set envvar DBUS_SESSION_BUS_ADDRESS=$XDG_RUNTIME_DIR/bus (if it exists) or DBUS_SESSION_BUS_ADDRESS=/dev/null.
2025-04-16T06:16:55.130826Z info Resources opened {"log_id": "0vwJjlM0000", "system": "bolt-kvstore", "path": "/root/.influxdbv2/influxd.bolt"}
Error: bucket "authorizationsv1": bucket not found
See 'influxd -h' for help