Skip to content

Instantly share code, notes, and snippets.

@tsleite
Created January 4, 2021 15:07
Show Gist options
  • Save tsleite/c61749c674ebc4138473ef9236481abc to your computer and use it in GitHub Desktop.
Save tsleite/c61749c674ebc4138473ef9236481abc to your computer and use it in GitHub Desktop.
#!/bin/bash
# Arquivo realiza um backup rápido do sqlite3 do grafana para o diretório /tmp
PATH=/tmp
DB="/var/lib/grafana/grafana.db"
BACKUP="$PATH/grafana.db-$(date +%Y%m%d).bck"
SQLITE=/usr/bin/sqlite3
ZIP=/bin/gzip
 
# Execução 
${SQLITE} ${DB} ".backup ${BACKUP}"
${ZIP} ${BACKUP}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment