How to make log archive backups?
For example, you can regularly archive as a zip file, and you can also view historical log files。
Do you mean backups of everything or just a log stream as described in #6840?
How to make a backup of everything?
schema_config:
configs:
- from: 2023-06-23
store: tsdb
object_store: aws
schema: v12
index:
prefix: loki_
period: 24h
As I understand it, I need to copy the indexes and chunks to a separate storage device, but it requires stopping Loki. Is there a way to make a backup without stopping the service?
Can I make a backup without stopping the service?
@Dolbodrynya I think it would be good to stop the service and then copy everything. I use loki:2.9.0 in docker compose with
loki:
image: grafana/loki:2.9.0
container_name: loki
ports:
- "3100:3100"
volumes:
- ./loki-config.yaml:/etc/loki/local-config.yaml
- loki-data:/loki
command: -config.file=/etc/loki/local-config.yaml
depends_on:
- grafana
configuration. I copy everything dir /loki in the container which have all the indexes (also use tsdb) with docker cp loki:/loki /tmp/loki_backup. Have not tried to restore the data to see if there would be any conflicts or errors but in theory it would work.