Closed Abuelodelanada closed 5 months ago
Would be very useful to have a HOW-TO that explains how to migrate the data stored in a working Loki instance (Loki-old) into a fresh new Loki deployment (Loki-new).
With @sed-i @selcem-artan came up with a tentative workflow:
loki-old
$ juju ssh --container loki loki-old/0 /charm/bin/pebble stop loki
loki-new
$ juju ssh --container loki loki-new/0 /charm/bin/pebble stop loki
/loki/
chown -R root:root /loki/*
$ juju ssh --container loki loki-new/0 /charm/bin/pebble start loki
Another approach is to use Loki API:
Fixed with this post: https://discourse.charmhub.io/t/how-to-migrate-the-logs-stored-in-loki-to-another-instance/14561
Enhancement Proposal
Would be very useful to have a HOW-TO that explains how to migrate the data stored in a working Loki instance (Loki-old) into a fresh new Loki deployment (Loki-new).
With @sed-i @selcem-artan came up with a tentative workflow:
loki-old
:$ juju ssh --container loki loki-old/0 /charm/bin/pebble stop loki
loki-new
:$ juju ssh --container loki loki-new/0 /charm/bin/pebble stop loki
loki-new
remove files and directories in/loki/
loki-old
toloki-new
the contents of/loki/
/loki/
:chown -R root:root /loki/*
loki-new
:$ juju ssh --container loki loki-new/0 /charm/bin/pebble start loki
Another approach is to use Loki API: