Add Backups page: gitea and dbs cron, Zabbix monitoring
36
Backups.md
Normal file
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`
|
||||
1
Home.md
1
Home.md
@@ -4,6 +4,7 @@
|
||||
|
||||
- [[Network]] — Netplan, Caddy, port forwarding
|
||||
- [[Storage]] — LVM setup
|
||||
- [[Backups]] — Gitea and database backups
|
||||
|
||||
## Services
|
||||
|
||||
|
||||
Reference in New Issue
Block a user