[pkg-go] Bug#943884: prometheus: Loosing all the historical data on upgrade to version 2+

Martina Ferrari tina at tincho.org
Thu Oct 31 12:54:30 GMT 2019


On 31/10/2019 11:11, root wrote:
> I've blindly upgraded prometheus 1.5.2+ds-2+b3 to 2.7.1+ds-3+b11 and
> this automatically removed all my historical data from
> /var/lib/prometheus/metrics/. I had to rollback because new version
> requires new configuration and finding solution on keeping historical
> data. As developers provided no way to convert to new format most
> probable solution will be to stuck on pre 2.0 version. Dramatic
> changes like that are dangerous and should not happen so easy.
Unless there is something broken, you should have gotten a notice while
upgrading that informs you of the breaking changes. Also, did it remove
you data or just ignored it?

This is the text you should have gotten from APT:

prometheus (2.0.0+ds3-1) unstable; urgency=medium


  The data format in Prometheus 2.0 has completely changed and is not
  backwards compatible with 1.x. Prometheus 2 will create a new data
  in /var/lib/prometheus/metrics2. The old data in
  can not be read by the new version.

  There is no conversion tool; if you want to retain access to the old data,
  it is necessary to run a separate Prometheus 1.x instance on that data
  directory. (This package makes no provision to allow this.)

Martina Ferrari (Tina, the artist formerly known as Tincho)

More information about the Pkg-go-maintainers mailing list