33800 Docs

← Retour

Backlog : Verification et Monitoring Backups

Date ajout : 12/01/2026 Priorite : HAUTE Categorie : INFRA Statut : TERMINE Date fin : 12/01/2026 Effort reel : 30min


Objectif

Mettre en place un systeme de verification des backups :


Backups existants

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

Verifications a ajouter

1. Rsync stock_8to

# 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

2. GitLab backup

# Verifier fichier backup recent
LAST_BACKUP=$(ls -t /stock_1to/gitlab-data/backups/*.tar 2>/dev/null | head -1)
# Verifier age < 24h

3. Snapshots ZFS

# Lister snapshots recents
zfs list -t snapshot -o name,creation | tail -10

Dashboard integration

Ajouter au monitoring :


Alertes

Condition Niveau Action
Rsync > 2h retard WARNING push
Rsync > 6h retard CRITICAL push + mail
GitLab backup > 24h WARNING push
Aucun snapshot 7j WARNING push

Test restauration

Planifier test mensuel :

  1. Restaurer un fichier aleatoire depuis backup
  2. Comparer checksum avec original
  3. Logger resultat

Notes

Le rsync horaire existe deja. Ce backlog ajoute la verification et le monitoring.


IMPLEMENTATION (12/01/2026)

Script deploye

Machine Script Cron
PVE /usr/local/bin/backup-check.sh /etc/cron.d/backup-check (*/6h:30)

Verifications implementees

Probleme corrige

Le montage NFS GitLab (/mnt/gitlab-nfs) etait casse depuis le 9 janvier.

Commandes

# 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

Integration notif-logger

Les alertes sont envoyees via: