Page MenuHomePhabricator

Backup strategy for Grafana
Closed, ResolvedPublic


I think I'll rsync grafana.db in a cron job.

@fgiunchedi would you do anything more sophisticated than that?

Related Objects

Event Timeline

@cwdent rsync'ing or otherwise copying the database sounds good to me, in fact in production copying into bacula is what we do for backups (cc @CDanis for visibility)

It's almost certainly unnecessary with as little write traffic as our grafanas get, but what I've been doing for my own pre-version-upgrade backups is the following:

sqlite3 /var/lib/grafana/grafana.db ".backup $HOME/grafana.db.backup$(date +%F)"

This acquires a read lock on the database and guarantees you get something consistent.

@CDanis thanks! I will definitely use that trick.

a968e43d enable grafana backups

b4ecac3f pull grafana archives to backup server
ef920db allow loggers to ssh to monitoring servers for archive collection

Pretty sure everything is done here, I will close once the archive sync runs successfully.