forgejo: clean backup dumps

This assumes the dumps are moved elsewhere.
This commit is contained in:
ibizaman 2025-09-09 08:06:48 +02:00 committed by Pierre Penninckx
parent ee5f379953
commit 6f27de81d2
2 changed files with 5 additions and 0 deletions

View file

@ -408,6 +408,7 @@ in
type = "tar.gz";
interval = "hourly";
};
systemd.services.forgejo-dump.preStart = "rm -f ${config.services.forgejo.dump.backupDir}/*.tar.gz";
})
# For Forgejo setup: https://github.com/lldap/lldap/blob/main/example_configs/gitea.md

View file

@ -165,6 +165,10 @@ twice with a future secrets SHB block.
### Backup {#services-forgejo-usage-backup}
Every hour, Forgejo takes a backup using the [built-in `dump` command](https://forgejo.org/docs/latest/admin/command-line/#dump).
This backup is ephemeral and should be moved in a permanent location.
This can be accomplished using the following config.
Backing up Forgejo using the [Restic block](blocks-restic.html) is done like so:
```nix