From d4410495267a4ef2508ea559e17e1024b6b932a8 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Mon, 6 Jan 2025 00:19:43 -0600 Subject: [PATCH] debug backups --- nixos/modules/nixos/lib.nix | 3 +-- nixos/modules/nixos/services/zfs-nightly-snap/default.nix | 4 ++-- .../services/zfs-nightly-snap/snap-and-mount-standalone.sh | 0 3 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 nixos/modules/nixos/services/zfs-nightly-snap/snap-and-mount-standalone.sh diff --git a/nixos/modules/nixos/lib.nix b/nixos/modules/nixos/lib.nix index bad9757..579be82 100644 --- a/nixos/modules/nixos/lib.nix +++ b/nixos/modules/nixos/lib.nix @@ -91,7 +91,7 @@ if builtins.hasAttr "remoteResticTemplate" options then options.remoteResticTemplate else null; # 2:05 daily backup with 3h random delay timerConfig = { - OnCalendar = "02:15"; # night snap is taken at 02:10 + OnCalendar = "06:05"; # night snap is taken at 02:10 Persistent = true; RandomizedDelaySec = "30m"; }; @@ -99,7 +99,6 @@ pruneOpts = [ "--keep-daily 7" "--keep-weekly 5" - "--keep-monthly 12" ]; # Initialize the repository if it doesn't exist initialize = true; diff --git a/nixos/modules/nixos/services/zfs-nightly-snap/default.nix b/nixos/modules/nixos/services/zfs-nightly-snap/default.nix index 85c2417..60e6df4 100644 --- a/nixos/modules/nixos/services/zfs-nightly-snap/default.nix +++ b/nixos/modules/nixos/services/zfs-nightly-snap/default.nix @@ -84,8 +84,8 @@ in }; startAt = lib.mkOption { type = lib.types.str; - default = "*-*-* 02:00:00 America/Chicago"; # Every day at 2 AM - description = "When to create and mount the ZFS snapshot. Defaults to 2 AM."; + default = "*-*-* 06:00:00 America/Chicago"; # Every day at 6 AM + description = "When to create and mount the ZFS snapshot. Defaults to 6 AM."; }; }; diff --git a/nixos/modules/nixos/services/zfs-nightly-snap/snap-and-mount-standalone.sh b/nixos/modules/nixos/services/zfs-nightly-snap/snap-and-mount-standalone.sh new file mode 100644 index 0000000..e69de29