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
  • Select an option

  • Save mkol5222/5a415b16fb44a6edfe2bacdd42b2a9eb to your computer and use it in GitHub Desktop.

Select an option

Save mkol5222/5a415b16fb44a6edfe2bacdd42b2a9eb to your computer and use it in GitHub Desktop.
Grafana Backup
BASEURL=http://username:[email protected]: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