From 00022f86a4efda0cd5c6de5708e78a5ddb079a22 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 10 Jun 2022 08:30:41 -0700 Subject: fix(backups): exclude more files from the backups We don't need to backup log files for grafana and sourcegraph. Change-Id: I8ed6f6ce1270a12233cad268bcd12e28ac2785cf Reviewed-on: https://cl.fcuny.net/c/world/+/383 Tested-by: CI Reviewed-by: Franck Cuny --- modules/services/grafana/default.nix | 5 ++++- modules/services/sourcegraph/default.nix | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/services/grafana/default.nix b/modules/services/grafana/default.nix index 773090b..fd80263 100644 --- a/modules/services/grafana/default.nix +++ b/modules/services/grafana/default.nix @@ -49,6 +49,9 @@ in { credentialsFile = secrets."acme/credentials".path; }; - my.services.backup = { paths = [ "/var/lib/grafana" ]; }; + my.services.backup = { + paths = [ "/var/lib/grafana" ]; + exclude = [ "/var/lib/grafana/log/" ]; + }; }; } diff --git a/modules/services/sourcegraph/default.nix b/modules/services/sourcegraph/default.nix index 6acf24c..e533b9d 100644 --- a/modules/services/sourcegraph/default.nix +++ b/modules/services/sourcegraph/default.nix @@ -41,6 +41,13 @@ in { my.services.backup = { paths = [ "/var/lib/sourcegraph/etc" "/var/lib/sourcegraph/data" ]; + exclude = [ + "/var/lib/sourcegraph/data/grafana/logs/" + "/var/lib/sourcegraph/data/jaeger.log" + "/var/lib/sourcegraph/data/grafana.log" + "/var/lib/sourcegraph/data/minio.log" + "/var/lib/sourcegraph/data/prometheus.log" + ]; }; }; } -- cgit 1.4.1