Skip to content

Instantly share code, notes, and snippets.

@piotr1212
Created November 16, 2015 10:10
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save piotr1212/000d2857d7d69677bfb8 to your computer and use it in GitHub Desktop.
Save piotr1212/000d2857d7d69677bfb8 to your computer and use it in GitHub Desktop.
Grafana sqlite backup script
cat /usr/share/grafana/grafana-backup.sh
#!/bin/bash
DB="/var/lib/grafana/grafana.db"
BACKUP="/data/backup/grafana/grafana.db-$(date +%Y%m%d).bck"
SQLITE=/usr/bin/sqlite3
ZIP=/bin/gzip
${SQLITE} ${DB} ".backup ${BACKUP}"
${ZIP} ${BACKUP}
@samratBasra
Copy link

Perfectly running this script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment