diff options
author | Franck Cuny <franck@fcuny.net> | 2022-03-07 07:13:38 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-03-07 07:13:38 -0800 |
commit | 49d4a82a43a12d62858a83a26fd86d27986a9fb8 (patch) | |
tree | 4d20bb82e0ce73d2cd3dad05fb72285dd6e25f6e /hosts/common | |
parent | restic: add the secret for the repo 'systems' (diff) | |
download | world-49d4a82a43a12d62858a83a26fd86d27986a9fb8.tar.gz |
unifi: backup the data to the local reo
Diffstat (limited to 'hosts/common')
-rw-r--r-- | hosts/common/server/unifi.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hosts/common/server/unifi.nix b/hosts/common/server/unifi.nix index ed1f82e..cf38137 100644 --- a/hosts/common/server/unifi.nix +++ b/hosts/common/server/unifi.nix @@ -62,5 +62,19 @@ in { Type = "oneshot"; }; }; + + age.secrets.restic-repo-systems.file = + ../../../secrets/restic/repo-systems.age; + + services.restic.backups = { + unifi = { + paths = [ "/var/lib/unifi" ]; + repository = "/data/slow/backups/systems"; + passwordFile = config.age.secrets.restic-repo-systems.path; + initialize = true; + extraBackupArgs = [ "--tag unifi" ]; + pruneOpts = [ "--keep-daily 7" "--keep-weekly 4" ]; + }; + }; }; } |