Compare commits

...

2 commits

Author SHA1 Message Date
6a3753a41d
setup hetzner backups 2025-08-01 12:59:50 +02:00
577043fb71
t470: be more aggressive pruning borgbase repo 2025-07-30 19:40:12 +02:00
2 changed files with 41 additions and 2 deletions

View file

@ -48,8 +48,8 @@
prune.keep = { prune.keep = {
within = "1d"; within = "1d";
daily = 7; daily = 7;
weekly = 4; weekly = 2;
monthly = 6; monthly = 3;
}; };
}; };
} }

View file

@ -105,6 +105,45 @@
Requires = "external.mount"; Requires = "external.mount";
}; };
}; };
services.borgbackup.jobs."hetzner" = {
paths = [
"/home"
"/var"
"/pile"
];
exclude = [
"/home/*/.local/share/Steam"
"**/*cache"
"**/*Cache"
"**/*trash"
"**/*Trash"
"/home/*/.mozilla/firefox"
"/home/*/GOG Games"
"**/target"
"**/result"
"/var/log"
];
repo = "ssh://u480566-sub1@u480566-sub1.your-storagebox.de:23/./repo";
encryption = {
mode = "repokey-blake2";
passCommand = "cat /root/borgbackup/hetzner_passphrase";
};
environment.BORG_RSH = "ssh -i /root/borgbackup/hetzner_ssh_key";
compression = "auto,lzma";
startAt = "daily";
persistentTimer = true;
extraCreateArgs = ["--stats" "--info" "--list" "--filter" "AMEC"];
extraPruneArgs = ["--stats" "--info" "--list"];
prune.keep = {
within = "1d";
daily = 7;
weekly = 4;
monthly = 12;
};
preHook = ''
/bin/sh -c 'while ! /run/current-system/sw/bin/ping -c1 google.com; do sleep 1; done'
'';
};
# postgresql backup # postgresql backup
services.postgresqlBackup = { services.postgresqlBackup = {