From 5f628237cf33668a7b213cd1d1bf4e57ba27ee25 Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Wed, 9 Feb 2022 12:54:53 -0500 Subject: [PATCH] nixos/servnerr-3: more frequent ZFS snapshots, verbose logging Signed-off-by: Matt Layher --- nixos/servnerr-3/storage.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/nixos/servnerr-3/storage.nix b/nixos/servnerr-3/storage.nix index 5a4aba8..a449a93 100644 --- a/nixos/servnerr-3/storage.nix +++ b/nixos/servnerr-3/storage.nix @@ -29,11 +29,20 @@ in { # Roll up snapshots for long periods of time, we have storage to burn. autoSnapshot = { enable = true; + # Debug output, keep zero-sized snapshots, parallel snapshots, UTC + # timestamp, verbose logging. + flags = "-d -k -p -u -v"; - # No 15 minute or hourly snapshots, things don't change that often. - frequent = 0; - hourly = 0; + # High frequency snapshots. For quickly rolling back unintended changes, + # so we don't keep very many. + # + # Every 15 minutes for 1 hour. + frequent = 4; + # Every hour for 4 hours. + hourly = 4; + # Beyond this point, retain more snapshots for long-term archival. + # # Every day for 2 weeks. daily = 14; # Every week for 2 months.