fix borg behaviour with relative paths by using absolute paths

If a relative path is given to a repository that already exists, but
borg did not backup to previously, borg tries to create a backup
relative to this path.

Might also be due to path restrictio in borg serve...
This commit is contained in:
Tim Schubert 2022-04-15 18:08:38 +02:00
parent 38e910fb46
commit 5419038e75
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA

View file

@ -63,7 +63,7 @@ in
services.borgbackup.jobs.bs = mkIf cfg.bs { services.borgbackup.jobs.bs = mkIf cfg.bs {
paths = "/"; paths = "/";
exclude = backupExcludes; exclude = backupExcludes;
repo = "borg@backup0.dadada.li:${config.networking.hostName}"; repo = "borg@backup0.dadada.li:/mnt/storage/backup/${config.networking.hostName}";
doInit = false; doInit = false;
environment = { environment = {
BORG_RSH = "ssh -i /var/lib/borgbackup/bs/id_ed25519 -o 'StrictHostKeyChecking accept-new'"; BORG_RSH = "ssh -i /var/lib/borgbackup/bs/id_ed25519 -o 'StrictHostKeyChecking accept-new'";