Skip to content

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

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

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

Conversation

@yvrhdn
Copy link
Copy Markdown
Contributor

@yvrhdn yvrhdn commented Feb 23, 2023

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]

Copy link
Copy Markdown
Contributor

@mapno mapno left a comment

Choose a reason for hiding this comment

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

@yvrhdn
Copy link
Copy Markdown
Contributor Author

yvrhdn commented Feb 24, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants