mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
Restic: spread out start times, add retry
This commit is contained in:
parent
76bfe9fa6a
commit
e23ced4779
3 changed files with 35 additions and 17 deletions
|
|
@ -17,6 +17,10 @@
|
||||||
repositoryFile = config.sops.secrets.restic_repo.path;
|
repositoryFile = config.sops.secrets.restic_repo.path;
|
||||||
passwordFile = config.sops.secrets.restic_password.path;
|
passwordFile = config.sops.secrets.restic_password.path;
|
||||||
|
|
||||||
|
extraBackupArgs = [
|
||||||
|
"--retry-lock 2h"
|
||||||
|
]
|
||||||
|
|
||||||
pruneOpts = [
|
pruneOpts = [
|
||||||
"--keep-daily 7"
|
"--keep-daily 7"
|
||||||
"--keep-weekly 5"
|
"--keep-weekly 5"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{ config, lib, pkgs, username, ... }: let
|
{ config, lib, pkgs, username, ... }: let
|
||||||
domain = "technicalissues.us";
|
domain = "technicalissues.us";
|
||||||
|
restic_backup_time = "01:00";
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/linux/lets-encrypt.nix
|
../../../common/linux/lets-encrypt.nix
|
||||||
|
|
@ -126,11 +127,17 @@ in {
|
||||||
secretKeybaseFile = config.sops.secrets.plausible_secret_key_base.path;
|
secretKeybaseFile = config.sops.secrets.plausible_secret_key_base.path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
restic.backups.daily.paths = [
|
restic.backups.daily = {
|
||||||
|
paths = [
|
||||||
"${config.users.users.${username}.home}/compose-files/owntracks"
|
"${config.users.users.${username}.home}/compose-files/owntracks"
|
||||||
"/var/backup/postgresql"
|
"/var/backup/postgresql"
|
||||||
"/var/lib/uptime-kuma"
|
"/var/lib/uptime-kuma"
|
||||||
];
|
];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = restic_backup_time;
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
tailscale = {
|
tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
authKeyFile = config.sops.secrets.tailscale_key.path;
|
authKeyFile = config.sops.secrets.tailscale_key.path;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
home_domain = "home.technicalissues.us";
|
home_domain = "home.technicalissues.us";
|
||||||
backend_ip = "127.0.0.1";
|
backend_ip = "127.0.0.1";
|
||||||
mini_watcher = "192.168.23.20";
|
mini_watcher = "192.168.23.20";
|
||||||
|
restic_backup_time = "02:00";
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
@ -516,7 +517,8 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
resolved.enable = true;
|
resolved.enable = true;
|
||||||
restic.backups.daily.paths = [
|
restic.backups.daily = {
|
||||||
|
paths = [
|
||||||
config.services.forgejo.stateDir
|
config.services.forgejo.stateDir
|
||||||
config.services.grafana.dataDir
|
config.services.grafana.dataDir
|
||||||
config.services.mealie.settings.DATA_DIR
|
config.services.mealie.settings.DATA_DIR
|
||||||
|
|
@ -528,6 +530,11 @@ in {
|
||||||
"/var/backup/postgresql"
|
"/var/backup/postgresql"
|
||||||
"/var/lib/prometheus2"
|
"/var/lib/prometheus2"
|
||||||
];
|
];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = restic_backup_time;
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
smartd.enable = true;
|
smartd.enable = true;
|
||||||
syncthing = {
|
syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue