<p>While the backfill is still <a href="https://github.com/prometheus/prometheus/pull/7586" rel="nofollow noreferrer">in review</a> for Prometheus, you can use <a href="https://github.com/sepich/thanos-kit/" rel="nofollow noreferrer">https://github.com/sepich/thanos-kit/</a> <code>import</code> command to import custom data in prometheus text format to Thanos.</p>

CC BY-SA 4.0
2020-09-13T07:47:28.633Z
2020-09-13T07:47:28.633Z
sepa
<p>Answering my own question (after a few days of research).</p>
<p>I have yet to test this but <a href="https://github.com/Cleafy/promqueen" rel="nofollow noreferrer">https://github.com/Cleafy/promqueen</a> seems to be designed for this purpose:</p>
<blockquote>
<p>PromQueen made possible to record prometheus metrics offline. PromQueen can, &gt; therefore, backfill the recorded data inside a native prometheus database.</p>
<p>PromQueen is composed of two primary tools:</p>
<ul>
<li>promrec tapes the metrics in a specified output file.</li>
<li>promplay backfills the prometheus database from scratch.</li>
</ul>
</blockquote>
<p>It doesn't have a lot of contributors but it comes from another POC repo and it was updated in the last 6 months, so I suspect it'll work fine.</p>
<p>In any case, it proves that you can plausibly back-fill prometheus, so it's not impossible.</p>
<h2>Roadmap - Prometheus</h2>
<p>You can also find this in the prometheus road-map, so it's clearly slated to be built-in eventually.</p>
<p><a href="https://prometheus.io/docs/introduction/roadmap/" rel="nofollow noreferrer">https://prometheus.io/docs/introduction/roadmap/</a></p>
<blockquote>
<p>Backfill time series
Backfilling will permit bulk loads of data in the past. This will allow for retroactive rule evaluations, and transferring old data from other monitoring systems.</p>
</blockquote>

CC BY-SA 4.0
2020-04-12T13:42:05.893Z
2020-04-12T16:07:31.200Z
2020-06-18T08:28:10.803Z
John Humphreys
<p>Projects like Thanos, which are based on prometheus storage formats, seem to say that it is impossible to back-fill data in a prometheus based system.</p>

<p>Can anyone explain why and if there are any possibilities for changing this?  Lack of ability to backfill would make it difficult to switch  metrics systems without impact (when previous systems can already retain multi years' data).</p>

<prometheus><thanos>
Back-filling prometheus (and related system) metrics?
John Humphreys
# Back-filling prometheus (and related system) metrics?

(Asked by: username_0 on 2020-04-06)

Projects like Thanos, which are based on prometheus storage formats, seem to say that it is impossible to back-fill data in a prometheus based system.

Can anyone explain why and if there are any possibilities for changing this? Lack of ability to backfill would make it difficult to switch metrics systems without impact (when previous systems can already retain multi years' data).

**Tags:** prometheus, thanos


---

## 2 answers

### Answer by username_0 on 2020-04-12. Score: 3 | Accepted answer

Answering my own question (after a few days of research).

I have yet to test this but <https://github.com/Cleafy/promqueen> seems to be designed for this purpose:

> PromQueen made possible to record prometheus metrics offline. PromQueen can, > therefore, backfill the recorded data inside a native prometheus database.
>
> PromQueen is composed of two primary tools:
>
> * promrec tapes the metrics in a specified output file.
> * promplay backfills the prometheus database from scratch.

It doesn't have a lot of contributors but it comes from another POC repo and it was updated in the last 6 months, so I suspect it'll work fine.

In any case, it proves that you can plausibly back-fill prometheus, so it's not impossible.

## Roadmap - Prometheus

You can also find this in the prometheus road-map, so it's clearly slated to be built-in eventually.

<https://prometheus.io/docs/introduction/roadmap/>

> Backfill time series
> Backfilling will permit bulk loads of data in the past. This will allow for retroactive rule evaluations, and transferring old data from other monitoring systems.


---

### Answer by username_1 on 2020-09-13. Score: 1

While the backfill is still [in review](https://github.com/prometheus/prometheus/pull/7586) for Prometheus, you can use <https://github.com/sepich/thanos-kit/> `import` command to import custom data in prometheus text format to Thanos.


---

