diff options
author | Franck Cuny <franck@fcuny.net> | 2022-03-07 07:40:09 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-03-07 07:40:09 -0800 |
commit | ae0512187119963ec7000e011871904ceb531600 (patch) | |
tree | d74cd64d1d9110d22fb89104c5a5e49d7f49849b | |
parent | prometheus: backup the data directory (diff) | |
download | world-ae0512187119963ec7000e011871904ceb531600.tar.gz |
grafana: backup the data directory
-rw-r--r-- | hosts/common/server/grafana.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hosts/common/server/grafana.nix b/hosts/common/server/grafana.nix index 50e7eed..61445a8 100644 --- a/hosts/common/server/grafana.nix +++ b/hosts/common/server/grafana.nix @@ -23,4 +23,18 @@ }]; }; }; + + age.secrets.restic-repo-systems.file = + ../../../secrets/restic/repo-systems.age; + + services.restic.backups = { + grafana = { + paths = [ "/var/lib/grafana/data" ]; + repository = "/data/slow/backups/systems"; + passwordFile = config.age.secrets.restic-repo-systems.path; + initialize = true; + extraBackupArgs = [ "--tag grafana" ]; + pruneOpts = [ "--keep-daily 7" "--keep-weekly 4" ]; + }; + }; } |