I’ve recently started using Loki for my project and have encountered an issue. I’m confused because I can’t seem to read my older logs that Loki has stored in AWS S3.
The Loki instance has been running via Docker Compose for the past 5 days, successfully storing logs in my AWS S3 bucket. However, I’m unable to retrieve logs from Grafana for dates older than today.
My question is, what steps should I take to ensure that Loki can sync the older logs from AWS S3, especially when logs have been removed in Loki due to the retention feature?
This is how log logs are stored in object store, S3 in your case. If the logs are older, they are deleted. This is why you can only see the last 24h of logs in Grafana.
Do you mean the logs in S3 are also deleted after 24 hours?
As of now, I can still see my older logs in my S3 bucket, but they have been compressed to GZIP. From my understanding, the retention period won’t delete the logs stored in AWS S3, as I would need to configure a separate retention policy in my S3 buckets to delete the logs.
We use S3 as well. Not actually sure how to check what the oldest files in an S3 bucket is
But e.g. Total number of objects is not growing at the moment. Actually it is going down. Everything looks like I would expect it to look if data retention worked as intended.
@airelljordan , have you find the way to read the older logs, which is in the bucket, but i am not able to read.
so for example i have a s3bucket and i put the data for 5 days, and then i changed the bucket, or change the complete setup, but i want that older 5 days logs to get read again in the new setup, is there any possibility to read that