Add Immich backup setup and Zabbix monitoring
19
Backups.md
19
Backups.md
@@ -12,6 +12,24 @@ See [[Gitea#Backup]] for details.
|
|||||||
|
|
||||||
Output: `/mnt/backups/gitea/gitea-dump-*.zip`
|
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/backups/media/cron.log 2>&1
|
||||||
|
```
|
||||||
|
|
||||||
|
| What | Source | Destination |
|
||||||
|
|------|--------|-------------|
|
||||||
|
| DB dump | `immich_postgres` container | `/mnt/backups/media/backups/immich-db-*.sql.gz` |
|
||||||
|
| Photos | `/mnt/media/upload/library/` | `/mnt/backups/media/library/` |
|
||||||
|
| Uploads | `/mnt/media/upload/upload/` | `/mnt/backups/media/upload/` |
|
||||||
|
| Profiles | `/mnt/media/upload/profile/` | `/mnt/backups/media/profile/` |
|
||||||
|
|
||||||
|
Thumbnails and encoded video are skipped — they can be regenerated by Immich.
|
||||||
|
DB dumps are retained for 14 days.
|
||||||
|
|
||||||
## DBS (databases)
|
## DBS (databases)
|
||||||
|
|
||||||
Rsync of all databases from SSD to backup volume.
|
Rsync of all databases from SSD to backup volume.
|
||||||
@@ -32,5 +50,6 @@ Both backups are monitored via Zabbix agent on host `AgapHost`.
|
|||||||
| `gitea.backup.status` | `1` if last dump succeeded | — |
|
| `gitea.backup.status` | `1` if last dump succeeded | — |
|
||||||
| `gitea.backup.age` | Seconds since last dump zip | High if > 25h |
|
| `gitea.backup.age` | Seconds since last dump zip | High if > 25h |
|
||||||
| `dbs.backup.age` | Seconds since last rsync (`.last_sync` mtime) | 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 |
|
||||||
|
|
||||||
Agent config: `/etc/zabbix/zabbix_agent2.d/gitea_backup.conf`
|
Agent config: `/etc/zabbix/zabbix_agent2.d/gitea_backup.conf`
|
||||||
|
|||||||
Reference in New Issue
Block a user