From 418a7ba10765bd9925b49666a7e899551e47c5e9 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 14 Jun 2022 08:16:01 +0200 Subject: [PATCH 1/2] configure hetzner backup --- systems/LoutreOS/services.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index 425592e..34f7597 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -239,7 +239,8 @@ in "/var/lib/radarr/.config/Radarr/radarr.db-wal" "/var/lib/radarr/.config/Radarr/radarr.db-shm" ]; - repo = "/mnt/backup/borg"; + repo = "ssh://u306925@u306925.your-storagebox.de:23/./loutreos"; + environment = { BORG_RSH = "ssh -i /mnt/secrets/hetzner_ssh_key"; }; encryption = { mode = "repokey-blake2"; passCommand = "cat /mnt/secrets/borgbackup_loutre_encryption_pass"; @@ -254,11 +255,6 @@ in readWritePaths = [ "/var/lib/postfix/queue/maildrop" ]; postHook = '' ${pkgs.zfs}/bin/zfs destroy loutrepool/var/postgresql@borgsnap - if [[ $exitStatus == 0 ]]; then - ${pkgs.rclone}/bin/rclone --config /mnt/secrets/rclone_loutre.conf sync -v $BORG_REPO BackupStorage:default - else - ${backup_mail_alert}/bin/mail.sh - fi ''; }; }; From a21636baa2f1593c245e54f68fcea8c01ff18a96 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Thu, 30 Jun 2022 18:58:34 +0200 Subject: [PATCH 2/2] reduce frequency of high IO operations --- systems/LoutreOS/configuration.nix | 5 ++++- systems/LoutreOS/monitoring.nix | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index cf299f5..28e111c 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -32,7 +32,10 @@ services.zfs = { autoSnapshot.enable = true; - autoScrub.enable = true; + autoScrub = { + enable = true; + interval = "monthly"; + }; }; hardware.usbWwan.enable = true; diff --git a/systems/LoutreOS/monitoring.nix b/systems/LoutreOS/monitoring.nix index 29915d2..a2120f0 100644 --- a/systems/LoutreOS/monitoring.nix +++ b/systems/LoutreOS/monitoring.nix @@ -7,7 +7,7 @@ in services = { smartd = { enable = true; - defaults.monitored = "-a -o on -s (S/../.././02|L/../../1/04)"; + defaults.monitored = "-a -o on -s (S/../.././02|L/../15/./02)"; notifications.mail = { enable = true; recipient = "paul@nyanlout.re";