only one go proc for restic on vpsfree, to see if it helps with memory usage

This commit is contained in:
Cyryl Płotnicki 2023-05-06 08:27:43 +01:00
parent 296e0a4483
commit 13e70c1757

View file

@ -1,12 +1,9 @@
{ { config, pkgs, ... }:
config, let
pkgs,
...
}: let
genericBackupPath = "/var/lib/backups/"; genericBackupPath = "/var/lib/backups/";
containersBackupPath = "${genericBackupPath}/oci-containers/"; containersBackupPath = "${genericBackupPath}/oci-containers/";
in rec { in rec {
environment.systemPackages = with pkgs; [restic]; environment.systemPackages = with pkgs; [ restic ];
sops.secrets."restic-backups-b2-repo-password" = { sops.secrets."restic-backups-b2-repo-password" = {
sopsFile = ./restic.sops.yaml; sopsFile = ./restic.sops.yaml;
@ -30,13 +27,17 @@ in rec {
mkdir -p ${containersBackupPath}/ mkdir -p ${containersBackupPath}/
${pkgs.podman}/bin/podman volume export woodpecker-server-data -o ${containersBackupPath}/woodpecker.tar ${pkgs.podman}/bin/podman volume export woodpecker-server-data -o ${containersBackupPath}/woodpecker.tar
''; '';
timerConfig = {OnCalendar = "hourly";}; timerConfig = { OnCalendar = "hourly"; };
environmentFile = "${config.sops.secrets.restic-backups-b2-environment.path}"; environmentFile =
"${config.sops.secrets.restic-backups-b2-environment.path}";
}; };
}; };
systemd.services.restic-backups-b2.serviceConfig = { systemd.services.restic-backups-b2 = {
Nice = 19; environment = { GOMAXPROCS = "1"; };
IOSchedulingClass = "idle"; serviceConfig = {
Nice = 19;
IOSchedulingClass = "idle";
};
}; };
} }