Date ajout : 12/01/2026 Priorite : HAUTE Categorie : INFRA Statut : TERMINE Date fin : 12/01/2026 Effort reel : 30min
Mettre en place un systeme de verification des backups :
| Source | Destination | Frequence | Script |
|---|---|---|---|
| stock_8to/33800-stack | stock_36to/backup-stock8 | Horaire | rsync-stock8-to-stock36.sh |
| GitLab | stock_1to/gitlab-backup | 6h | gitlab-backup create |
| VMs Proxmox | stock_36to/backup-proxmox | ? | vzdump |
# Verifier derniere execution
LAST_SYNC=$(stat -c %Y /stock_36to/data/backup-stock8/33800-stack/.sync_marker 2>/dev/null || echo 0)
NOW=$(date +%s)
DIFF=$((NOW - LAST_SYNC))
if [ $DIFF -gt 7200 ]; then # > 2h
# Alerte: sync en retard
fi
# Verifier fichier backup recent
LAST_BACKUP=$(ls -t /stock_1to/gitlab-data/backups/*.tar 2>/dev/null | head -1)
# Verifier age < 24h
# Lister snapshots recents
zfs list -t snapshot -o name,creation | tail -10
Ajouter au monitoring :
| Condition | Niveau | Action |
|---|---|---|
| Rsync > 2h retard | WARNING | push |
| Rsync > 6h retard | CRITICAL | push + mail |
| GitLab backup > 24h | WARNING | push |
| Aucun snapshot 7j | WARNING | push |
Planifier test mensuel :
Le rsync horaire existe deja. Ce backlog ajoute la verification et le monitoring.
| Machine | Script | Cron |
|---|---|---|
| PVE | /usr/local/bin/backup-check.sh | /etc/cron.d/backup-check (*/6h:30) |
Le montage NFS GitLab (/mnt/gitlab-nfs) etait casse depuis le 9 janvier.
mount -t nfs4 192.168.1.155:/stock_1to/gitlab-data /mnt/gitlab-nfs# Test manuel
/usr/local/bin/backup-check.sh --test
# Execution reelle
sudo /usr/local/bin/backup-check.sh
# Logs
cat /var/log/backup-check.log
Les alertes sont envoyees via: