From 9cbf1434f9f8ef58527ea1888ebf38f0b749b073 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Fri, 3 Jan 2025 17:38:24 -0600 Subject: [PATCH] updated forgejo dump backup location --- nixos/hosts/varda/resources/prune-backups.sh | 4 ++-- nixos/modules/nixos/services/forgejo/default.nix | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nixos/hosts/varda/resources/prune-backups.sh b/nixos/hosts/varda/resources/prune-backups.sh index 8ac70fe..5f1fe48 100644 --- a/nixos/hosts/varda/resources/prune-backups.sh +++ b/nixos/hosts/varda/resources/prune-backups.sh @@ -1,8 +1,8 @@ # Set the backup directory -BACKUP_DIR="/var/lib/forgejo/dump" +BACKUP_DIR="/mnt/storage/forgejo/backups" # Keep the 3 most recent backups -KEEP_NUM=3 +KEEP_NUM=7 echo "Starting backup cleanup process..." echo "Keeping the $KEEP_NUM most recent backups in $BACKUP_DIR" diff --git a/nixos/modules/nixos/services/forgejo/default.nix b/nixos/modules/nixos/services/forgejo/default.nix index 8f5d650..a766ecc 100644 --- a/nixos/modules/nixos/services/forgejo/default.nix +++ b/nixos/modules/nixos/services/forgejo/default.nix @@ -31,7 +31,10 @@ in enable = true; package = cfg.package; # enable sql db dumps daily - dump.enable = true; + dump = { + enable = true; + backupDir = "/mnt/backup/forgejo/backups/"; + }; database.type = "postgres"; # Enable support for Git Large File Storage lfs.enable = true;