Table of Contents
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
Immich (photos)
Script: immich-app/backup.sh — dumps DB first, then rsyncs originals to backup volume. Runs at 02:30 (after Immich's built-in dump at 02:00).
30 2 * * * /home/alvis/agap_git/immich-app/backup.sh >> /mnt/toshiba/backups/media/cron.log 2>&1
| What | Source | Destination |
|---|---|---|
| DB dump | immich_postgres container |
/mnt/toshiba/backups/media/backups/immich-db-*.sql.gz |
| Photos | /mnt/smsg/media/upload/library/ |
/mnt/toshiba/backups/media/library/ |
| Uploads | /mnt/smsg/media/upload/upload/ |
/mnt/toshiba/backups/media/upload/ |
| Profiles | /mnt/smsg/media/upload/profile/ |
/mnt/toshiba/backups/media/profile/ |
Thumbnails and encoded video are skipped — they can be regenerated by Immich. DB dumps are retained for 14 days.
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/
Vaultwarden
Script: vaultwarden/backup.sh — uses built-in container backup, copies db/config/keys. Runs every 3 days.
0 2 */3 * * /home/alvis/agap_git/vaultwarden/backup.sh >> /var/log/vaultwarden-backup.log 2>&1
Destination: /mnt/backups/vaultwarden/<timestamp>/
Retention: last 5 backups
Zabbix: trapper item vaultwarden.backup.ts (id 70368) — trigger if no backup in 4 days
Seafile
Script: seafile/backup.sh — mysqldump of 3 DBs + rsync of seafile data. Runs every 3 days.
0 2 */3 * * /home/alvis/agap_git/seafile/backup.sh >> /var/log/seafile-backup.log 2>&1
Destination: /mnt/backups/seafile/<timestamp>/
Retention: last 5 backups
Zabbix: trapper item seafile.backup.ts (id 70369) — trigger if no backup in 4 days
Users (/mnt/misc)
Script: users-backup.sh — rsyncs alvis and liza home dirs from /mnt/misc to backup volume. Runs every 3 days.
0 4 */3 * * /home/alvis/agap_git/users-backup.sh >> /var/log/users-backup.log 2>&1
| Source | Destination |
|---|---|
/mnt/misc/alvis/ |
/mnt/backups/users/alvis/ |
/mnt/misc/liza/ |
/mnt/backups/users/liza/ |
Zabbix: trapper item users.backup.ts (id 70379) — trigger (id 32869) if no backup in 4 days
Zabbix Monitoring
Backups monitored via Zabbix 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 |
immich.backup.age |
Seconds since last immich backup (.last_sync mtime) |
High if > 25h |
vaultwarden.backup.ts |
Timestamp of last backup (trapper) | Warning if > 4 days |
seafile.backup.ts |
Timestamp of last backup (trapper) | Warning if > 4 days |
users.backup.ts |
Timestamp of last backup (trapper) | Warning if > 4 days |
Agent config: /etc/zabbix/zabbix_agent2.d/gitea_backup.conf