Fix: backup cron must run as root (backup dir is root-owned)
4
Gitea.md
4
Gitea.md
@@ -25,12 +25,14 @@ Configuration is in the `AgapHost` repository:
|
|||||||
|
|
||||||
## Backup
|
## 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
|
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/`.
|
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/`.
|
Output: `gitea-dump-*.zip` containing `repos/`, `gitea-db.sql`, `app.ini`, `data/`.
|
||||||
|
|||||||
Reference in New Issue
Block a user