Skip to content

Instantly share code, notes, and snippets.

@mkol5222
Forked from fbrnc/grafana_backup.sh
Created September 7, 2017 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkol5222/5a415b16fb44a6edfe2bacdd42b2a9eb to your computer and use it in GitHub Desktop.
Save mkol5222/5a415b16fb44a6edfe2bacdd42b2a9eb to your computer and use it in GitHub Desktop.
Grafana Backup
BASEURL=http://username:password@127.0.0.1:3000
for dash in $(curl -s -k "${BASEURL}/api/search" | jq -r '.[].title'); do
curl -k "${BASEURL}/api/dashboards/db/${dash}" > "${dash}.json"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment