grafana-backup-tool icon indicating copy to clipboard operation
grafana-backup-tool copied to clipboard

Restore from k8s backup job

Open darioneto opened this issue 2 years ago • 1 comments

Stupid question, how would I run this on the reverse, to restore backup from the cronjob? Or is this only one way? restore manually?

darioneto avatar May 09 '23 11:05 darioneto

Restoring is done by adding a RESTORE=true and ARCHIVE_FILE=202006280247.tar.gz block to the config map, or however you are loading the environment variables, the image checks this for this on start up.

The file needs to be mounted into the cronjob as well, as the job doesn't backup from S3 yet.

From the example:

apiVersion: v1
kind: ConfigMap
metadata:
  name: grafana-backup-tool
  namespace: grafana-backup-tool
data:
  RESTORE: "true" 
  ARCHIVE_FILE: "202006280247.tar.gz"
  GRAFANA_URL: "http://grafana.grafana.svc.cluster.local:80"
  GRAFANA_TOKEN: "{YOUR_GRAFANA_TOKEN}"
  GRAFANA_ADMIN_ACCOUNT: "backup"
  GRAFANA_ADMIN_PASSWORD: "{YOUR_GRAFANA_ADMIN_PASSWORD}"
  ...

declan-fitzpatrick avatar Feb 21 '24 17:02 declan-fitzpatrick