prepare for full borg

This commit is contained in:
root 2025-11-08 16:58:27 +00:00
parent f90a2ce5f7
commit 2c9fa4fbe1
19 changed files with 212 additions and 134 deletions

View file

@ -40,6 +40,33 @@ in {
};
};
};
borgbackup.jobs."akkoma" = {
repo = "ssh://n65yc7ze@n65yc7ze.repo.borgbase.com/./repo";
environment = {
BORG_RSH = "ssh -i ${config.age.secrets."borg_ed25519".path} -o 'StrictHostKeyChecking=no'";
};
paths = [
"/var/lib/akkoma"
];
encryption.mode = "none";
compression = "auto,lzma";
startAt = "daily";
prune.keep = {
daily = 7;
weekly = 4;
monthly = -1;
};
readWritePaths = [
"/var/backup/postgres"
];
preHook = ''
mkdir -p /var/backup/postgres
${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump akkoma > /var/backup/postgres/akkoma.sql
'';
postHook = ''
rm -f /var/backup/postgres/akkoma.sql
'';
};
};
distrust.services."akkoma" = {