diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index 2b55762..102b87b 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -34,6 +34,7 @@ }; services.btrbk = { + extraPackages = [ pkgs.lz4 ]; instances = { hf = { onCalendar = "hourly"; @@ -56,6 +57,32 @@ }; }; }; + bak = { + onCalendar = "daily"; + settings = { + 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/@hades"; + }; + }; + }; + }; }; }; diff --git a/hosts/jupiter/hardware-configuration.nix b/hosts/jupiter/hardware-configuration.nix index 34bd410..730528d 100644 --- a/hosts/jupiter/hardware-configuration.nix +++ b/hosts/jupiter/hardware-configuration.nix @@ -50,6 +50,7 @@ }; services.btrbk = { + extraPackages = [ pkgs.lz4 ]; instances = { hf = { onCalendar = "hourly"; diff --git a/hosts/nasbackup/hardware-configuration.nix b/hosts/nasbackup/hardware-configuration.nix index 7acdee4..d833726 100644 --- a/hosts/nasbackup/hardware-configuration.nix +++ b/hosts/nasbackup/hardware-configuration.nix @@ -51,6 +51,7 @@ }; services.btrbk = { + extraPackages = [ pkgs.lz4 ]; instances = { hf = { onCalendar = "hourly"; @@ -91,7 +92,7 @@ ssh_user = "btrbk"; volume = { - "ssh://jupiter.home.opel-online.de/mnt/snapshots/Mars" = { + "ssh://jupiter.home.opel-online.de:2220/mnt/snapshots/Mars" = { target = "/mnt/nas/Backups/Mars"; subvolume = { "@nas" = {}; @@ -99,7 +100,7 @@ }; }; volume = { - "ssh://jupiter.home.opel-online.de/mnt/snapshots/Pluto" = { + "ssh://jupiter.home.opel-online.de:2220/mnt/snapshots/Pluto" = { target = "/mnt/nas/Backups/Pluto"; subvolume = { "@/Games" = {}; diff --git a/modules/hardware/backup.nix b/modules/hardware/backup.nix index cb345e5..a95c781 100644 --- a/modules/hardware/backup.nix +++ b/modules/hardware/backup.nix @@ -9,6 +9,10 @@ key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDU2NJ9xwYnp6/frIOv96ih8psiFcC2eOQeT+ZEMW5rq"; roles = [ "source" "info" "send" ]; } + { + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIma7jNVQZM+lFMOKUex0+cyDpeUA3Wo4SEJ7P9YnHPG"; + roles = [ "target" "info" "receive" ]; + } ]; }; }