From e6f9e7b3fa1a05b7d9179ecb83f1ded950b06659 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 9 Mar 2022 18:37:51 -0800 Subject: gitea: do a backup with restic --- hosts/common/server/gitea.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/common/server/gitea.nix b/hosts/common/server/gitea.nix index 9b9bf83..b90ef51 100644 --- a/hosts/common/server/gitea.nix +++ b/hosts/common/server/gitea.nix @@ -27,4 +27,16 @@ in { user = cfg.user; }; }; + + services.restic.backups = { + gitea = { + paths = [ cfg.Statedir ]; + repository = "/data/slow/backups/systems"; + passwordFile = config.age.secrets.restic-repo-systems.path; + timerConfig = { OnCalendar = "00:15"; }; + initialize = true; + extraBackupArgs = [ "--tag gitea" ]; + pruneOpts = [ "--keep-daily 7" "--keep-weekly 4 --keep-monthly 6" ]; + }; + }; } -- cgit 1.4.1