I have a grafana Loki logs that's in my cluster. I am able to see my logs but as at the moment, the cluster is no longer in use and I would like to delete it but I still have some logs I would like to extract Loki and maybe store it locally on my system, or Azure bucket.
Is there a way to extract this logs and save locally or azure bucket. I used loki helm to setup my Loki, promethus any help is appreciated
You could use logcli
to connect to Loki. See this documentation.
Example command:
port-forward <my-loki-pod> 3100
logcli query '{ job="foo"}' --limit=5000 --since=48h -o raw > mylog.txt