diff options
author | Franck Cuny <franck@fcuny.net> | 2022-03-07 07:35:07 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-03-07 07:35:07 -0800 |
commit | 78674f6a567367ce48204e38491a4817adc66b37 (patch) | |
tree | 21b17d2a731ee7f9e70ed7d27bd973cdddb989d7 | |
parent | unifi: backup the data to the local reo (diff) | |
download | world-78674f6a567367ce48204e38491a4817adc66b37.tar.gz |
prometheus: backup the data directory
-rw-r--r-- | hosts/common/server/prometheus.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hosts/common/server/prometheus.nix b/hosts/common/server/prometheus.nix index d939a5a..d097cff 100644 --- a/hosts/common/server/prometheus.nix +++ b/hosts/common/server/prometheus.nix @@ -52,4 +52,18 @@ in { } ]; }; + + age.secrets.restic-repo-systems.file = + ../../../secrets/restic/repo-systems.age; + + services.restic.backups = { + prometheus = { + paths = [ "/var/lib/prometheus2" ]; + repository = "/data/slow/backups/systems"; + passwordFile = config.age.secrets.restic-repo-systems.path; + initialize = true; + extraBackupArgs = [ "--tag prometheus" ]; + pruneOpts = [ "--keep-daily 7" "--keep-weekly 4" ]; + }; + }; } |