From d9a20013b9b4a83f26dd1a239eaf0d2c6ef9cece Mon Sep 17 00:00:00 2001 From: Kabbone Date: Mon, 14 Oct 2024 20:08:16 +0200 Subject: [PATCH] add lifebook to backup --- hosts/lifebook/hardware-configuration.nix | 28 ++++++++++++++++++++++ hosts/nasbackup/hardware-configuration.nix | 4 ++++ 2 files changed, 32 insertions(+) diff --git a/hosts/lifebook/hardware-configuration.nix b/hosts/lifebook/hardware-configuration.nix index 8bda423..0ebf25c 100644 --- a/hosts/lifebook/hardware-configuration.nix +++ b/hosts/lifebook/hardware-configuration.nix @@ -61,6 +61,7 @@ ''; btrbk = { + extraPackages = [ pkgs.lz4 pkgs.mbuffer ]; instances = { hf = { onCalendar = "hourly"; @@ -84,6 +85,33 @@ }; }; }; + bak = { + onCalendar = "daily"; + settings = { + stream_buffer = "256m"; + stream_compress = "lz4"; + incremental = "yes"; + snapshot_create = "no"; + snapshot_dir = "@snapshots"; + timestamp_format = "long"; + + snapshot_preserve_min = "all"; + target_preserve_min = "no"; + target_preserve = "2m 4w"; + + ssh_identity = "/etc/btrbk/ssh/id_ed25519_btrbk_nas"; + ssh_user = "btrbk"; + + volume = { + "/mnt/snapshots/root" = { + subvolume = { + "@home" = {}; + }; + target = "ssh://jupiter.home.opel-online.de:2220/mnt/snapshots/Mars/@snapshots/@lifebook"; + }; + }; + }; + }; }; }; diff --git a/hosts/nasbackup/hardware-configuration.nix b/hosts/nasbackup/hardware-configuration.nix index ff6d542..04cda93 100644 --- a/hosts/nasbackup/hardware-configuration.nix +++ b/hosts/nasbackup/hardware-configuration.nix @@ -104,6 +104,10 @@ target = "/mnt/nas/Backups/Hades"; snapshot_dir = "@snapshots/@hades"; }; + "@lifebook/@home" = { + target = "/mnt/nas/Backups/Lifebook"; + snapshot_dir = "@snapshots/@lifebook"; + }; }; }; };