ysde/grafana-backup-tool

Restore from k8s backup job

darioneto opened this issue · 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?

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}"
  ...