Skip to content

tempo-cli: add command to migrate a tenant - #2130

Merged
yvrhdn merged 5 commits into
grafana:mainfrom
yvrhdn:kvrhdn/migrate-tenant
Feb 27, 2023
Merged

tempo-cli: add command to migrate a tenant#2130
yvrhdn merged 5 commits into
grafana:mainfrom
yvrhdn:kvrhdn/migrate-tenant

Conversation

@yvrhdn

@yvrhdn yvrhdn commented Feb 23, 2023

Copy link
Copy Markdown
Contributor

What this PR does:
Adds a new tempo-cli command migrate tenant which can copy the blocks of a tenant between two tenants and even two backends.

Usage:

go run ./cmd/tempo-cli migrate tenant --source-config-file source-config.yaml --config-file dest-config.yaml tenant1 tenant2

Note it can not change format of the block, the entire block will be streamed from source to destination without parsing.

I've also added a Dockerfile and Makefile target for tempo-cli. You can run it with docker run docker.io/grafana/tempo-cli <args>.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@mapno mapno left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yvrhdn

yvrhdn commented Feb 24, 2023

Copy link
Copy Markdown
Contributor Author

LGTM. Could you add an entry to https://grafana.com/docs/tempo/latest/operations/tempo_cli?

Yep! Good point, done 🙂

@yvrhdn
yvrhdn merged commit b60a761 into grafana:main Feb 27, 2023
@yvrhdn
yvrhdn deleted the kvrhdn/migrate-tenant branch February 27, 2023 14:24
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
* tempo-cli: add command to migrate a tenant

* Update CHANGELOG.md

* Linting

* Update tempo-cli docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants