Skip to content

Build a tool to migrate TSDB blocks from Thanos/Prometheus to Cortex blocks storage #2920

Closed
@pracucci

Description

@pracucci

I'm noticing an increased interest to move TSDB blocks from Thanos and/or Prometheus to the Cortex blocks storage. In the PR #2919 I've documented the expected procedure, but would be great to have a tool to automate the rewrite the meta.json in the bucket.

My idea would be to leave the blocks copy/upload procedure to the user (because it highly depends on the user's setup), while offering a tool to automatically rewrite the meta.json in the bucket. The procedure is documented in the PR but its TL;DR is:

  1. Iterate the tenants in the bucket
  2. For each tenant, iterate the blocks in the bucket
  3. For each block, download the meta.json, decode, manipulate, re-encode and re-upload

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions