From a4ad3b808868e610c5e718045e3d97c9760dcbc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Mon, 9 Jun 2025 02:21:17 +0200 Subject: [PATCH] fix: restic automatic pruning --- SwarselSystems.org | 11 +++++++++-- modules/nixos/server/restic.nix | 9 ++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index d4110e6..2f5f285 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -7746,7 +7746,7 @@ Here we just define some aliases for rebuilding the system, and we allow some in :CUSTOM_ID: h:b73ac8bf-b721-4563-9eff-973925c99a39 :END: -Once this is finished, it will house a restic client that manages automatic backups of my image library. Before I get to this however, I first need to organice my pictures in the first place. +This manages backups for my pictures and obsidian files. #+begin_src nix :tangle modules/nixos/server/restic.nix { lib, config, inputs, ... }: @@ -7783,11 +7783,18 @@ Once this is finished, it will house a restic client that manages automatic back "/Vault/data/paperless" "/Vault/Eternor/Bilder" "/Vault/Eternor/Immich" + "/Vault/familymedia" + ]; + pruneOpts = [ + "--keep-daily 3" + "--keep-weekly 2" + "--keep-monthly 3" + "--keep-yearly 100" ]; repository = "${resticRepo}"; initialize = true; timerConfig = { - OnCalendar = "19:00"; + OnCalendar = "03:00"; }; }; diff --git a/modules/nixos/server/restic.nix b/modules/nixos/server/restic.nix index 3e256b5..e5187bd 100644 --- a/modules/nixos/server/restic.nix +++ b/modules/nixos/server/restic.nix @@ -32,11 +32,18 @@ in "/Vault/data/paperless" "/Vault/Eternor/Bilder" "/Vault/Eternor/Immich" + "/Vault/familymedia" + ]; + pruneOpts = [ + "--keep-daily 3" + "--keep-weekly 2" + "--keep-monthly 3" + "--keep-yearly 100" ]; repository = "${resticRepo}"; initialize = true; timerConfig = { - OnCalendar = "19:00"; + OnCalendar = "03:00"; }; };