Merge pull request #559 from genebean/restic

Restic: spread out start times, add retry
This commit is contained in:
Gene Liverman 2025-10-09 16:22:36 -04:00 committed by GitHub
commit 6a306d4bdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 17 deletions

View file

@ -17,6 +17,10 @@
repositoryFile = config.sops.secrets.restic_repo.path;
passwordFile = config.sops.secrets.restic_password.path;
extraBackupArgs = [
"--retry-lock 2h"
]
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"

View file

@ -1,5 +1,6 @@
{ config, lib, pkgs, username, ... }: let
domain = "technicalissues.us";
restic_backup_time = "01:00";
in {
imports = [
../../../common/linux/lets-encrypt.nix
@ -126,11 +127,17 @@ in {
secretKeybaseFile = config.sops.secrets.plausible_secret_key_base.path;
};
};
restic.backups.daily.paths = [
"${config.users.users.${username}.home}/compose-files/owntracks"
"/var/backup/postgresql"
"/var/lib/uptime-kuma"
];
restic.backups.daily = {
paths = [
"${config.users.users.${username}.home}/compose-files/owntracks"
"/var/backup/postgresql"
"/var/lib/uptime-kuma"
];
timerConfig = {
OnCalendar = restic_backup_time;
Persistent = true;
};
};
tailscale = {
enable = true;
authKeyFile = config.sops.secrets.tailscale_key.path;

View file

@ -4,6 +4,7 @@
home_domain = "home.technicalissues.us";
backend_ip = "127.0.0.1";
mini_watcher = "192.168.23.20";
restic_backup_time = "02:00";
in {
imports = [
./hardware-configuration.nix
@ -516,18 +517,24 @@ in {
];
};
resolved.enable = true;
restic.backups.daily.paths = [
config.services.forgejo.stateDir
config.services.grafana.dataDir
config.services.mealie.settings.DATA_DIR
config.services.nextcloud.home
"${config.users.users.${username}.home}/compose-files/wallabag"
"/orico/immich/library"
"/orico/jellyfin/data"
"/orico/jellyfin/staging/downloaded-files"
"/var/backup/postgresql"
"/var/lib/prometheus2"
];
restic.backups.daily = {
paths = [
config.services.forgejo.stateDir
config.services.grafana.dataDir
config.services.mealie.settings.DATA_DIR
config.services.nextcloud.home
"${config.users.users.${username}.home}/compose-files/wallabag"
"/orico/immich/library"
"/orico/jellyfin/data"
"/orico/jellyfin/staging/downloaded-files"
"/var/backup/postgresql"
"/var/lib/prometheus2"
];
timerConfig = {
OnCalendar = restic_backup_time;
Persistent = true;
};
};
smartd.enable = true;
syncthing = {
enable = true;