From c47d72a37602ee293b39a0f6b259114a1c2f90e2 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 24 Mar 2021 19:06:03 +0100 Subject: [PATCH] matrix: don't backup cached media --- services/matrix.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/services/matrix.nix b/services/matrix.nix index 14a1210..56ef563 100644 --- a/services/matrix.nix +++ b/services/matrix.nix @@ -180,9 +180,12 @@ in { federationPort.public ]; - my.services.borg-backup = mkIf cfg.enable { - paths = [ "/var/lib/matrix-synapse" ]; - # FIXME: find out what I can exclude safely + my.services.borg-backup = let + dataDir = config.services.matrix-synapse.dataDir; + in mkIf cfg.enable { + paths = [ dataDir ]; + # this is just caching for other servers media, doesn't need backup + exclude = [ "${dataDir}/media/remote_*" ]; }; }; }