hosts: nasbak: add remote btrbk

This commit is contained in:
Kabbone 2023-10-29 09:46:49 +01:00
parent 91f8856a97
commit 21376db87b
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
4 changed files with 53 additions and 4 deletions

View File

@ -14,8 +14,8 @@
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
[ (modulesPath + "/installer/scan/not-detected.nix")] ++
[( import ../../modules/hardware/backup.nix )];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ];

View File

@ -14,8 +14,8 @@
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
[(modulesPath + "/profiles/qemu-guest.nix")] ++
[( import ../../modules/hardware/backup.nix )];
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];

View File

@ -49,6 +49,7 @@
};
services.btrbk = {
extraPackages = [ pkgs.lz4 ];
instances = {
hf = {
onCalendar = "hourly";
@ -72,6 +73,39 @@
};
};
};
bak = {
stream_compress = "lz4";
onCalendar = "weekly";
settings = {
incremental = "yes";
snapshot_create = "no";
snapshot_dir = "@snapshots";
timestamp_format = "long";
snapshot_preserve_min = "all";
target_preserve_min = "no";
target_preserve = "4w 2m";
ssh_identity = "/etc/btrbk/ssh/id_ed25512_btrbk";
volume = {
"ssh://jupiter.home.opel-online.de/mnt/snapshots/Mars" = {
target = "/mnt/nas/Backups/nas/Mars";
subvolume = {
"@nas" = {};
};
};
};
volume = {
"ssh://jupiter.home.opel-online.de/mnt/snapshots/Pluto" = {
target = "/mnt/nas/Backups/nas/Pluto";
subvolume = {
"@" = {};
};
};
};
};
};
# lf = {
# onCalendar = "daily";
# settings = {

View File

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
{
services.btrbk = {
sshAccess = [
{
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDU2NJ9xwYnp6/frIOv96ih8psiFcC2eOQeT+ZEMW5rq";
roles = [ "source" "info" "send" ];
}
];
extraPackages = [ pkgs.lz4 ];
};
}