From afebac0d46d2c2acf954fcaa2faeeb390a6019d0 Mon Sep 17 00:00:00 2001 From: Jan-Bulthuis Date: Sat, 21 Jun 2025 17:48:16 +0200 Subject: [PATCH] Updated backup script to unmount shares --- hosts/vm-oddjob/configuration.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts/vm-oddjob/configuration.nix b/hosts/vm-oddjob/configuration.nix index a88a6a9..8894ed6 100644 --- a/hosts/vm-oddjob/configuration.nix +++ b/hosts/vm-oddjob/configuration.nix @@ -62,17 +62,20 @@ '' ] ++ lib.map (share: '' + mount /mnt/${share} ${pkgs.util-linux}/bin/prlimit --nofile=1024:1024 ${pkgs.proxmox-backup-client}/bin/proxmox-backup-client backup nfs.pxar:/mnt/${share} --ns $PBS_NAMESPACE --backup-id share-${share} --change-detection-mode=metadata --exclude "#recycle" + umount /mnt/${share} '') inputs.secrets.lab.nas.backupShares ) ); in [ - "0 0 * * * ${script} " + "0 0 * * * root ${script}" ]; }; # Mount filesystems + fileSystems = lib.listToAttrs ( lib.map (share: { name = "/mnt/${share}"; @@ -80,6 +83,7 @@ device = "//${inputs.secrets.lab.nas.host}/${share}"; fsType = "cifs"; options = [ + "noauto" "sec=krb5,credentials=${config.sops.secrets."smb-credentials".path}" ]; };