From 577043fb71974b8da33629501f7fc3f83afce0ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Wed, 30 Jul 2025 19:40:09 +0200 Subject: [PATCH 1/2] t470: be more aggressive pruning borgbase repo --- borgbackup.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/borgbackup.nix b/borgbackup.nix index a4f7312..8f7f15b 100644 --- a/borgbackup.nix +++ b/borgbackup.nix @@ -48,8 +48,8 @@ prune.keep = { within = "1d"; daily = 7; - weekly = 4; - monthly = 6; + weekly = 2; + monthly = 3; }; }; } From 6a3753a41d40622cfbb11892d8ab60ef63a3e67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Fri, 1 Aug 2025 11:32:39 +0200 Subject: [PATCH 2/2] setup hetzner backups --- void.nix | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/void.nix b/void.nix index 6d578d0..7c266f8 100644 --- a/void.nix +++ b/void.nix @@ -105,6 +105,45 @@ 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 services.postgresqlBackup = {