Enabled multi-tenancy in Loki and lose my old logs

Hi everybody. I have been using Loki for a while now but I didn’t enable multi-tenancy when I first configured it. Now, I need to enable it. Do you know what the best process would be to do it?
I added the Xorgs header to the agent and added the auth_enabled: true.
However, when I deployed the change I could not get the logs from before the deployment and also got a lot this error: wrong chunk metadata

I don’t think there is a migration guide, at least I don’t see one in the documentation section. With auth disabled, all Loki logs are written to the directory in your chunk storage with the ID of fake. So you should be able to see your existing logs still if you use fake as the value for the X-Scope-OrgID header.

Personally, I would recommend you to revert your change first, then consider one of the following migration paths:

  1. Test and see if you can use fake for the OrgID header as a way to see past logs.
  2. Or, deploy a new Loki cluster with auth_enabled, and migrate your logs and clients to it, and leave old cluster running (with minimum number of writer) until such time that retention policy would have retired all logs on the old cluster.

Hi, thanks for the response.

I configured the OrgID header as it said in the documentation: X-Scope-OrgID: tenant1|tenant2|fake to see all the logs, and it didn’t work.

I might have to follow your second recommendation.
Thank you.