From e5c9c163238a3a8e4fa2da855c492e4d310bb29b Mon Sep 17 00:00:00 2001 From: daragh Date: Mon, 25 Mar 2024 11:58:15 +0000 Subject: [PATCH] gitlab backup options --- applications/gitlab.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/applications/gitlab.nix b/applications/gitlab.nix index 36b2aae..e0fe3e0 100644 --- a/applications/gitlab.nix +++ b/applications/gitlab.nix @@ -178,6 +178,10 @@ in { domain = lib.mkForce domain_base; }; + services.skynet_backup.normal.backups = [ + "/etc/skynet/backups/gitlab" + ]; + services.gitlab = { enable = true; @@ -213,6 +217,14 @@ in { }; }; + # see https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/gitlab.nix#L295 + backup = { + startAt = "Sat *-*-* 04:00:00"; # Sat 4am weekly + path = "/etc/skynet/backups/gitlab"; # Has to be same as line 182 + keepTime = 2190; # 3 months(hours) - 12 backups untill the first one gets deleted + skip = ["builds" "artifacts" "registry" "packages" "terraform_state"]; # see https://docs.gitlab.com/ee/administration/backup_restore/backup_gitlab.html#excluding-specific-data-from-the-backup + }; + # use the local email client smtp.enable = true;