tsuki/borg: set up borgbackup

This commit is contained in:
Oystein Kristoffer Tveit 2023-07-12 01:44:09 +02:00
parent 0e3a4c35d2
commit 40e95ce030
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146

View File

@ -0,0 +1,17 @@
{ config, ... }:
{
services.borgbackup.jobs = let
createJob = path: endpoint: {
paths = path;
encryption.mode = "none";
environment.BORG_RSH = "ssh -i /home/h7x4/.ssh/id_rsa";
repo = "ssh://h7x4@10.0.0.220/mnt/SSD1/backup/${endpoint}";
compression = "auto,zstd";
startAt = "daily";
};
in {
postgres = createJob config.services.postgresqlBackup.location "postgres";
minecraft = createJob config.services.minecraft-servers.dataDir "minecraft";
gitea = createJob config.services.gitea.dump.backupDir "gitea";
};
}