btrfsborg: compression, rm timelapse from rsync.net
This commit is contained in:
@@ -573,21 +573,31 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
btrfsborg = {
|
||||
btrfsborg =
|
||||
let
|
||||
this = "${config.networking.hostName}.${config.networking.domain}";
|
||||
vno3-nk = "borgstor@${myData.hosts."vno3-nk.jakst.vpn".jakstIP}";
|
||||
rsync-net = "zh2769@zh2769.rsync.net";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
passwordPath = config.age.secrets.borgbackup-password.path;
|
||||
sshKeyPath = "/etc/ssh/ssh_host_ed25519_key";
|
||||
dirs =
|
||||
builtins.concatMap
|
||||
(
|
||||
host:
|
||||
let
|
||||
prefix = "${host}:${config.networking.hostName}.${config.networking.domain}";
|
||||
in
|
||||
[
|
||||
{
|
||||
subvolume = "/var/lib";
|
||||
repo = "${prefix}-var_lib";
|
||||
repo = "${vno3-nk}:${this}-timelapse-r11";
|
||||
paths = [ "private/timelapse-r11" ];
|
||||
backup_at = "*-*-* 02:01:00 UTC";
|
||||
compression = "none";
|
||||
}
|
||||
]
|
||||
++ (builtins.concatMap
|
||||
(host: [
|
||||
{
|
||||
subvolume = "/var/lib";
|
||||
repo = "${host}:${this}-var_lib";
|
||||
paths = [
|
||||
"hass"
|
||||
"gitea"
|
||||
@@ -597,7 +607,6 @@ in
|
||||
"bitwarden_rs"
|
||||
"matrix-synapse"
|
||||
"private/soju"
|
||||
"private/timelapse-r11"
|
||||
|
||||
# https://immich.app/docs/administration/backup-and-restore/
|
||||
"immich/library"
|
||||
@@ -610,16 +619,16 @@ in
|
||||
}
|
||||
{
|
||||
subvolume = "/home";
|
||||
repo = "${prefix}-home-motiejus-annex2";
|
||||
repo = "${host}:${this}-home-motiejus-annex2";
|
||||
paths = [ "motiejus/annex2" ];
|
||||
backup_at = "*-*-* 02:30:01 UTC";
|
||||
}
|
||||
]
|
||||
)
|
||||
])
|
||||
[
|
||||
"zh2769@zh2769.rsync.net"
|
||||
"borgstor@${myData.hosts."vno3-nk.jakst.vpn".jakstIP}"
|
||||
];
|
||||
rsync-net
|
||||
vno3-nk
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
btrfssnapshot = {
|
||||
|
||||
@@ -125,16 +125,31 @@ in
|
||||
verboseLogs = false;
|
||||
};
|
||||
|
||||
btrfsborg = {
|
||||
btrfsborg =
|
||||
let
|
||||
this = "${config.networking.hostName}.${config.networking.domain}";
|
||||
rsync-net = "zh2769@zh2769.rsync.net";
|
||||
fwminex = "borgstor@${myData.hosts."fwminex.jakst.vpn".jakstIP}";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
passwordPath = config.age.secrets.borgbackup-password.path;
|
||||
sshKeyPath = "/etc/ssh/ssh_host_ed25519_key";
|
||||
dirs =
|
||||
#[
|
||||
#{
|
||||
# subvolume = "/data";
|
||||
# repo = "${fwminex}:${this}-timelapse-r11";
|
||||
# paths = [ "timelapse-r11" ];
|
||||
# backup_at = "*-*-* 02:01:00 UTC";
|
||||
# compression = "none";
|
||||
#}
|
||||
#] ++ (
|
||||
builtins.concatMap
|
||||
(
|
||||
host:
|
||||
let
|
||||
prefix = "${host}:${config.networking.hostName}.${config.networking.domain}";
|
||||
prefix = "${host}:${this}";
|
||||
in
|
||||
[
|
||||
{
|
||||
@@ -146,9 +161,10 @@ in
|
||||
]
|
||||
)
|
||||
[
|
||||
"zh2769@zh2769.rsync.net"
|
||||
"borgstor@${myData.hosts."fwminex.jakst.vpn".jakstIP}"
|
||||
rsync-net
|
||||
fwminex
|
||||
];
|
||||
#);
|
||||
};
|
||||
|
||||
btrfssnapshot = {
|
||||
|
||||
@@ -33,6 +33,10 @@ in
|
||||
default = { };
|
||||
};
|
||||
backup_at = lib.mkOption { type = str; };
|
||||
compression = lib.mkOption {
|
||||
type = str;
|
||||
default = "auto,zstd,10";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -59,7 +63,7 @@ in
|
||||
"config.mj.base.unitstatus.enable must be true";
|
||||
lib.nameValuePair "${lib.strings.sanitizeDerivationName subvolume}-${toString i}" (
|
||||
{
|
||||
inherit (attrs) repo paths;
|
||||
inherit (attrs) repo paths compression;
|
||||
|
||||
doInit = true;
|
||||
encryption = {
|
||||
@@ -67,7 +71,6 @@ in
|
||||
passCommand = "cat ${cfg.passwordPath}";
|
||||
};
|
||||
extraArgs = "--remote-path=borg1";
|
||||
compression = "auto,zstd,10";
|
||||
extraCreateArgs = "--chunker-params buzhash,10,23,16,4095";
|
||||
startAt = attrs.backup_at;
|
||||
preHook = ''
|
||||
|
||||
Reference in New Issue
Block a user