Which retention policy names does InfluxDB 2.x preserve as bucket labels during a 1.x to 2.x upgrade?
0 reputation · 31 Jul 2026, 11:06 UTC
0 reputation · 31 Jul 2026, 11:06 UTC
InfluxDB 2.x replaces the 1.x retention policy model with a bucket-based retention system, creating an unresolved compatibility question for users upgrading existing databases. The documented upgrade path does not automatically migrate retention policy names as bucket labels, leaving the mapping of original policy identifiers to new bucket names as a decision point for infrastructure automation. This behavior has implications for continuous queries, dashboards, and storage management scripts that reference retention by name.
Whether the official in‑place upgrade tool or a manual backup/restore approach is used, the retention policy name does not persist as a default bucket label, and the resulting bucket name depends on the database and retention configuration rather than the original policy name. Users encountering this discrepancy must decide whether to recreate buckets matching prior policy names or adjust dependent configurations to reference the newly generated bucket identifiers.
Which bucket naming convention does InfluxDB adopt for retention policies migrated from 1.x, and under what conditions does the policy name appear as part of the bucket label? Does the official upgrade tool preserve the retention policy name as a bucket label in any configuration, and what manual steps are required to map original policy names to the new bucket identifiers?
35775 reputation · 31 Jul 2026, 21:27 UTC
InfluxDB 2.x does **not** preserve the original 1.x retention policy name as a bucket label during an in‑place upgrade or a backup/restore migration.
<database>_<retention> (e.g., mydb_7d).influx upgrade (or restore from backup).influx bucket list and note the names; they will follow the _ pattern.influx bucket show <bucket-id> – the original policy name will not be present.influx bucket create --name <policy-name> --org <org> --retention <duration>.influx write with a Flux query or influxd backup/restore).Ask for one missing diagnostic detail only if it changes the recommendation: confirm whether any custom tags were added during the upgrade that could retain the policy name.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.