fix rustic module
This commit is contained in:
parent
5c0979147b
commit
fa55da25f3
@ -34,7 +34,7 @@
|
|||||||
ignore-devid = true;
|
ignore-devid = true;
|
||||||
group-by = "label";
|
group-by = "label";
|
||||||
skip-identical-parent = true;
|
skip-identical-parent = true;
|
||||||
glob = [
|
globs = [
|
||||||
"!/media/nas/**/cache"
|
"!/media/nas/**/cache"
|
||||||
"!/media/nas/**/.cache"
|
"!/media/nas/**/.cache"
|
||||||
"!/media/nas/**/log"
|
"!/media/nas/**/log"
|
||||||
@ -45,12 +45,12 @@
|
|||||||
"!/srv/gitea"
|
"!/srv/gitea"
|
||||||
"!/srv/wiki"
|
"!/srv/wiki"
|
||||||
];
|
];
|
||||||
sources = [{
|
snapshots = [{
|
||||||
source = "/srv /media/nas/containers /media/nas/media-stack/configs";
|
sources = [ "/srv /media/nas/containers" "/media/nas/media-stack/configs" ];
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
forget = {
|
forget = {
|
||||||
filter-label = [ label ];
|
filter-labels = [ label ];
|
||||||
group-by = "label";
|
group-by = "label";
|
||||||
prune = true;
|
prune = true;
|
||||||
keep-daily = 4;
|
keep-daily = 4;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ config, inputs, ... }: {
|
{ config, lib, inputs, ... }: {
|
||||||
imports = [ inputs.ataraxiasjel-nur.nixosModules.rustic ];
|
imports = [ inputs.ataraxiasjel-nur.nixosModules.rustic ];
|
||||||
|
backups.postgresql.authentik.proxyAddress = lib.mkForce null;
|
||||||
|
|
||||||
sops.secrets.rustic-vps-pass.sopsFile = inputs.self.secretsDir + /rustic.yaml;
|
sops.secrets.rustic-vps-pass.sopsFile = inputs.self.secretsDir + /rustic.yaml;
|
||||||
sops.secrets.rustic-backups-s3-env.sopsFile = inputs.self.secretsDir + /rustic.yaml;
|
sops.secrets.rustic-backups-s3-env.sopsFile = inputs.self.secretsDir + /rustic.yaml;
|
||||||
@ -37,12 +38,12 @@
|
|||||||
ignore-devid = true;
|
ignore-devid = true;
|
||||||
group-by = "label";
|
group-by = "label";
|
||||||
skip-identical-parent = true;
|
skip-identical-parent = true;
|
||||||
sources = [{
|
snapshots = [{
|
||||||
source = "/srv/marzban";
|
sources = [ "/srv/marzban" ];
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
forget = {
|
forget = {
|
||||||
filter-label = [ label ];
|
filter-labels = [ label ];
|
||||||
group-by = "label";
|
group-by = "label";
|
||||||
prune = true;
|
prune = true;
|
||||||
keep-daily = 4;
|
keep-daily = 4;
|
||||||
|
@ -41,6 +41,8 @@ with lib;
|
|||||||
Persistent = true;
|
Persistent = true;
|
||||||
};
|
};
|
||||||
# Backup postgresql db and pass it to rustic through stdin
|
# Backup postgresql db and pass it to rustic through stdin
|
||||||
|
# Runs the next command:
|
||||||
|
# pg_dump ${dbName} | zstd --rsyncable --stdout - | rustic -P postgresql-authentik backup -
|
||||||
backupCommandPrefix = "${config.services.postgresql.package}/bin/pg_dump ${backup.dbName} | ${pkgs.zstd}/bin/zstd --rsyncable --stdout - |";
|
backupCommandPrefix = "${config.services.postgresql.package}/bin/pg_dump ${backup.dbName} | ${pkgs.zstd}/bin/zstd --rsyncable --stdout - |";
|
||||||
extraBackupArgs = [ "-" ];
|
extraBackupArgs = [ "-" ];
|
||||||
# Rustic profile yaml
|
# Rustic profile yaml
|
||||||
@ -64,7 +66,7 @@ with lib;
|
|||||||
stdin-filename = "${backup.dbName}.dump.zst";
|
stdin-filename = "${backup.dbName}.dump.zst";
|
||||||
};
|
};
|
||||||
forget = {
|
forget = {
|
||||||
filter-label = [ backup.dbName ];
|
filter-labels = [ backup.dbName ];
|
||||||
group-by = "label";
|
group-by = "label";
|
||||||
prune = true;
|
prune = true;
|
||||||
keep-daily = 4;
|
keep-daily = 4;
|
||||||
|
@ -148,14 +148,14 @@ in
|
|||||||
ignore-devid = true;
|
ignore-devid = true;
|
||||||
group-by = "label";
|
group-by = "label";
|
||||||
skip-identical-parent = true;
|
skip-identical-parent = true;
|
||||||
glob = [ "!/var/lib/**/backups" "!/var/lib/**/.cache" "!/var/lib/**/logs" ];
|
globs = [ "!/var/lib/**/backups" "!/var/lib/**/.cache" "!/var/lib/**/logs" ];
|
||||||
exclude-if-present = [ ".nobackup" "CACHEDIR.TAG" ];
|
exclude-if-present = [ ".nobackup" "CACHEDIR.TAG" ];
|
||||||
sources = [{
|
snapshots = [{
|
||||||
source = lib.strings.concatStringsSep " " (map (x: "/var/lib/mc-${x}") (lib.attrNames instances));
|
sources = map (x: "/var/lib/mc-${x}") (lib.attrNames instances);
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
forget = {
|
forget = {
|
||||||
filter-label = [ label ];
|
filter-labels = [ label ];
|
||||||
group-by = "label";
|
group-by = "label";
|
||||||
prune = true;
|
prune = true;
|
||||||
keep-hourly = 6;
|
keep-hourly = 6;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user