From 844b94049335a304ebd939d626bd87a35606831d Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 24 Mar 2021 00:31:45 +0100 Subject: [PATCH] nextcloud: ignore in-progress uploads in backups --- services/nextcloud.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/nextcloud.nix b/services/nextcloud.nix index a7c0992..3d22a69 100644 --- a/services/nextcloud.nix +++ b/services/nextcloud.nix @@ -71,8 +71,12 @@ in }; }; - my.services.borg-backup = lib.mkIf cfg.enable { - paths = [ config.services.nextcloud.home ]; + my.services.borg-backup = let + nextcloudHome = config.services.nextcloud.home; + in lib.mkIf cfg.enable { + paths = [ nextcloudHome ]; + # borg can fail if *.part files disappear during backup + exclude = [ "${nextcloudHome}/data/*/uploads" ]; }; }; }