Add Backups page: gitea and dbs cron, Zabbix monitoring

2026-03-07 18:17:55 +00:00
parent 7adec04c7e
commit 0824ae9b0a
2 changed files with 37 additions and 0 deletions

36
Backups.md Normal file

@@ -0,0 +1,36 @@
# Backups
Daily backups run from **root's crontab** (`sudo crontab -e`).
## Gitea
See [[Gitea#Backup]] for details.
```
0 3 * * * /home/alvis/agap_git/gitea/backup.sh >> /mnt/backups/gitea/cron.log 2>&1
```
Output: `/mnt/backups/gitea/gitea-dump-*.zip`
## DBS (databases)
Rsync of all databases from SSD to backup volume.
```
30 3 * * * rsync -a --delete /mnt/ssd/dbs/ /mnt/backups/dbs/ >> /mnt/backups/dbs/cron.log 2>&1 && touch /mnt/backups/dbs/.last_sync
```
Source: `/mnt/ssd/dbs/` (gitea, otter, pihole, qdrant, zabbix)
Destination: `/mnt/backups/dbs/`
## Zabbix Monitoring
Both backups are monitored via Zabbix agent on host `AgapHost`.
| Item key | Description | Trigger |
|----------|-------------|---------|
| `gitea.backup.status` | `1` if last dump succeeded | — |
| `gitea.backup.age` | Seconds since last dump zip | High if > 25h |
| `dbs.backup.age` | Seconds since last rsync (`.last_sync` mtime) | High if > 25h |
Agent config: `/etc/zabbix/zabbix_agent2.d/gitea_backup.conf`

@@ -4,6 +4,7 @@
- [[Network]] — Netplan, Caddy, port forwarding - [[Network]] — Netplan, Caddy, port forwarding
- [[Storage]] — LVM setup - [[Storage]] — LVM setup
- [[Backups]] — Gitea and database backups
## Services ## Services