InfluxDB2: Issue creating Token?

Hello,

first my English is bad! So im sorry about.

Is there a issue when create a Token or i going to handle it wrong?

If i create a new full acess Token, to take some Backups, the Token do not have read access.
Not possible to use it to read all the Databases.

If i create a coustom Token and grand all Access to this token, its the same.

Only if i clone the Masterkey (The Token where generated at First Login the the WebUI) works.

So i have to use in all Cases the Masterkey.

i found this Issue yesterday, i would setup a Replic of may lokal InfluxDB to another remote InfluxDB Server, nothing worked, really nothing going right yesterday.
Today i found the problem with the generated tokens.

But i do NOT want to use the Masterkey to replic/backup the Databases to the remote Server.

So im going to the next Question. How to create a full working “replic” from my local Server to another remote Server with all Databases and all Data?
The Replic (Influx-CLI) only streams new Data. (By the Way i dont want a stream, i want a daylie “Backup/Clone to another Database”.

Greets and sorry for my English again.

Lucifor

Hi

I read your question about the issue with the admin token for backup.
Take a look here; I solved it like this (last entry):

You can export the data in influx, just fine-tune the resolution.

It’s like this: you can’t create an admin token with backup permissions.
This seems like a bug to me. You’ll find a lot of information about this, but no real solution:

BR

Hello!
No apologies needed, your english is great!

You can create an All Access token via the UI or CLI. For example, using the CLI:

influx auth create --all-access

This should grant full access to all resources in your organization. If this does not work, and only the original setup token works, it may be a known issue or a bug in your installation. If you continue to have issues, consider upgrading to the latest version or checking for known bugs in your version (see documentation).

If you want to make a full backup and restore (not just stream new data), you should use the backup and restore commands, not replication.

Backup and Restore Steps:

  1. Backup your data on the source server:
influx backup /path/to/backup-dir
  1. Transfer the backup files to your new server.

  2. Restore the data on the new server:

influx restore /path/to/backup-dir
  • To restore all data, use:
influx restore /path/to/backup-dir
  • To restore and replace all InfluxDB data (including tokens, users, dashboards, etc.), use:
influx restore /path/to/backup-dir --full
  • If you are restoring to a new server, you must use the admin token from the source server during setup:
influx setup --token <ADMIN_TOKEN>

See the docs here:

These other docs might be helpful:

You can also consider using a [Flux task](Get started with InfluxDB tasks | InfluxDB OSS v2 Documentation to replicate data to another database on a user defined schedule (for example daily). Here’s an example of a task that is querying one bucket and writing data to another (it’s also using the secret store and package).

import "influxdata/influxdb/secrets"

cloudToken = secrets.get(key: "INFLUX_CLOUD_API_TOKEN")

option task = {name: "replicate_data", every: 1h}

from(bucket: "example-oss-bucket")
    |> range(start: -1h)
    |> filter(fn: (r) => r._measurement == "example-measurement")
    |> to(
        bucket: "example-cloud-bucket",
        host: "https://cloud2.influxdata.com",
        org: "example-org",
        token: cloudToken,
    )

Or [Edge to Data Replication](“InfluxDB Edge Data Replication | InfluxData

Hello and thanks for youre Help.

Untill the Backup this will show, is it a Problem?

2025/06/27 13:11:30 INFO: Downloading metadata snapshot
2025/06/27 13:11:30 INFO: Backing up TSM for shard 1
2025/06/27 13:11:57 INFO: Backing up TSM for shard 5
2025/06/27 13:13:54 INFO: Backing up TSM for shard 13
2025/06/27 13:16:00 INFO: Backing up TSM for shard 21
2025/06/27 13:18:14 INFO: Backing up TSM for shard 29
2025/06/27 13:20:32 INFO: Backing up TSM for shard 37
2025/06/27 13:22:58 INFO: Backing up TSM for shard 45
2025/06/27 13:25:35 INFO: Backing up TSM for shard 53
2025/06/27 13:28:23 INFO: Backing up TSM for shard 61
2025/06/27 13:31:17 INFO: Backing up TSM for shard 69
2025/06/27 13:34:15 INFO: Backing up TSM for shard 77
2025/06/27 13:37:19 INFO: Backing up TSM for shard 85
2025/06/27 13:40:30 INFO: Backing up TSM for shard 93
2025/06/27 13:43:46 INFO: Backing up TSM for shard 101
2025/06/27 13:47:08 INFO: Backing up TSM for shard 109
2025/06/27 13:50:37 INFO: Backing up TSM for shard 117
2025/06/27 13:54:14 INFO: Backing up TSM for shard 125
2025/06/27 13:56:37 INFO: Backing up TSM for shard 131
2025/06/27 13:56:37 INFO: Backing up TSM for shard 122
2025/06/27 13:56:37 WARN: Shard 122 removed during backup
2025/06/27 13:56:37 INFO: Backing up TSM for shard 123
2025/06/27 13:56:37 WARN: Shard 123 removed during backup
2025/06/27 13:56:37 INFO: Backing up TSM for shard 124
2025/06/27 13:56:37 WARN: Shard 124 removed during backup
2025/06/27 13:56:37 INFO: Backing up TSM for shard 126
2025/06/27 13:56:37 WARN: Shard 126 removed during backup
2025/06/27 13:56:37 INFO: Backing up TSM for shard 127
2025/06/27 13:56:37 WARN: Shard 127 removed during backup
2025/06/27 13:56:37 INFO: Backing up TSM for shard 128
2025/06/27 13:56:37 WARN: Shard 128 removed during backup
2025/06/27 13:56:37 INFO: Backing up TSM for shard 129
2025/06/27 13:56:37 INFO: Backing up TSM for shard 130
2025/06/27 13:56:37 WARN: Shard 130 removed during backup