grafana-backup-tool
grafana-backup-tool copied to clipboard
Restore is not done
Hello, I have a problem when restoring the backup hosted in S3. As you can see, the backup is done and uploaded correctly to S3, but when I try the restore it throws me the following error. I also had it run as Cronjobs in Kubernetes and it does the backup successfully but not the restore. Can someone give me a little help?
Docker:
sudo docker run --user $(id -u):$(id -g) --rm --name grafana-backup-tool
-e GRAFANA_TOKEN="glsa_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-e GRAFANA_URL=https://sre-monitor-dev.gruposancristobal.org.ar
-e GRAFANA_ADMIN_ACCOUNT=admin
-e GRAFANA_ADMIN_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxx
-e VERIFY_SSL=False
-v /tmp/backup/:/opt/grafana-backup-tool/OUTPUT
-e AWS_S3_BUCKET_NAME="sre-backup-grafana"
-e AWS_S3_BUCKET_KEY="backup"
-e AWS_DEFAULT_REGION="us-east-1"
-e AWS_ACCESS_KEY_ID="xxxxxxxxxxxxxxxxxxxxxxx"
-e AWS_SECRET_ACCESS_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-e RESTORE="true"
-e ARCHIVE_FILE="202305101820.tar.gz"
ysde/docker-grafana-backup-tool
Error:
########################################
[Pre-Check] Server status is 'OK' !!
########################################
Download archives from S3:
Download from S3 was successful
restoring datasource: /tmp/tmpbn3zjt2e/OUTPUT/datasources/202305101820/rjriIiKVk.datasource
[DEBUG] resp status: 409
[DEBUG] resp body: {'message': 'data source with the same name already exists', 'traceID': ''}
create datasource: Prometheus, status: 409, msg: {'message': 'data source with the same name already exists', 'traceID': ''}
restoring library_element: /tmp/tmpbn3zjt2e/OUTPUT/library-elements/202305101820/xMDOgqA4k.library_element
[DEBUG] resp status: 200
[DEBUG] resp body: []
query folder:, status:200
Traceback (most recent call last):
File "/usr/bin/grafana-backup", line 33, in