From 7adec04c7ef7fb3a4fa7ec37fece71f8cc4c4d25 Mon Sep 17 00:00:00 2001 From: alvis Date: Sat, 7 Mar 2026 18:05:16 +0000 Subject: [PATCH] Fix: backup cron must run as root (backup dir is root-owned) --- Gitea.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gitea.md b/Gitea.md index 00ef62a..ac6612b 100644 --- a/Gitea.md +++ b/Gitea.md @@ -25,12 +25,14 @@ Configuration is in the `AgapHost` repository: ## Backup -Daily backup via cron at 3 AM: +Daily backup via **root's** cron at 3 AM: ``` 0 3 * * * /home/alvis/agap_git/gitea/backup.sh >> /mnt/backups/gitea/cron.log 2>&1 ``` +> **Note:** Must run as root — `/mnt/backups/gitea/` is root-owned and not writable by other users. + Script: `gitea/backup.sh` — stops services, runs `gitea dump`, saves zip to `/mnt/backups/gitea/`. Output: `gitea-dump-*.zip` containing `repos/`, `gitea-db.sql`, `app.ini`, `data/`.