From 262466c233f8eb16e0fc0728d5025157163d9c37 Mon Sep 17 00:00:00 2001 From: Roman Lubij Date: Thu, 12 Feb 2026 17:12:18 +0100 Subject: [PATCH] Improve backups, again --- hardware-configuration.nix | 12 ++++++++++++ modules/services.nix | 9 ++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hardware-configuration.nix b/hardware-configuration.nix index e52a7ce..f6a9bcf 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -143,6 +143,18 @@ ]; }; + fileSystems."/media/home-backup" = { + device = "/dev/disk/by-uuid/4c0c8b24-6fca-49c1-8e34-e00e240576e3"; + fsType = "btrfs"; + options = [ + "subvol=home-backup" + "space_cache=v2" + "compress=zstd:10" + "noatime" + "autodefrag" + ]; + }; + fileSystems."/media/pipa" = { device = "/dev/disk/by-uuid/0013f713-acf4-496b-b43f-25258283b884"; fsType = "f2fs"; diff --git a/modules/services.nix b/modules/services.nix index cbc0c09..a716ad3 100644 --- a/modules/services.nix +++ b/modules/services.nix @@ -97,7 +97,7 @@ volume."/" = { subvolume = "home"; - snapshot_dir = "home/.snapshots"; + snapshot_dir = "home/.snapshots/daily"; }; }; }; @@ -106,15 +106,14 @@ onCalendar = "weekly"; settings = { timestamp_format = "long"; - snapshot_preserve_min = "latest"; - + snapshot_preserve = "no"; target_preserve = "20w"; volume."/" = { subvolume = "home"; - snapshot_dir = "home/.snapshots"; - target = "/media/data/home-backups"; + snapshot_dir = "home/.snapshots/weekly"; + target = "/media/home-backup"; }; }; };