O2switch sert de backup externe pour l'infrastructure 33800. En cas de panne locale, les données critiques et un dashboard de status sont accessibles depuis l'extérieur.
┌─────────────────────────────────────────────────────────────────────────────┐
│ INFRASTRUCTURE LOCALE (PVE) │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ /stock_8to/33800-stack/ │
│ ├── claude/ ──────────────────┐ │
│ ├── monitoring/ ──────────────┐ │ │
│ ├── scripts/ ────────┐ │ │ │
│ ├── docker/secrets/ ────┐ │ │ │ │
│ └── databases/ ┐ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ ┌─────────────────────┼───┼───┼─────┼───┼──────────────────────────────┐ │
│ │ CRONS DE SYNCHRONISATION │ │
│ ├──────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │ │ │ │ │
│ │ sync-configs (2h) ◄──┴───┴───┘ │ │ rsync configs/secrets │ │
│ │ pg-to-o2switch (6h) ◄───────────────┘ │ pg_dump PostgreSQL │ │
│ │ gitlab-to-o2switch (6h30) ◄─────────────┘ tar GitLab backups │ │
│ │ generate.sh (1h) ────────────────────► git push dashboard │ │
│ │ git push claude/ ────────────────────► git push claude-docs │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
│
│ SSH (clé RSA)
│ Host: o2switch
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ O2SWITCH (yellow.o2switch.net) │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ~/backup/ ~/public_html/ │
│ ├── configs/ (rsync) ├── dashboard/ (git auto-deploy) │
│ │ ├── claude/ │ ├── index.html │
│ │ ├── secrets/ │ ├── crons.html │
│ │ ├── stacks/ │ ├── schema.html │
│ │ └── scripts/ │ └── ... │
│ │ │ │
│ ├── postgresql/ (pg_dump) ├── status/ (PHP statique) │
│ │ └── supabase_*.sql.gz │ └── index.php │
│ │ │ │
│ ├── gitlab/ (tar sync) ├── claude/ (PHP viewer) │
│ │ └── *_gitlab_backup.tar │ ├── index.php │
│ │ │ └── vendor/Parsedown.php │
│ └── claude/ (git) │ │
│ ├── propositions/ └── webhooks/ (PHP proxy) │
│ ├── tasks/ └── receive.php │
│ ├── backlog/ │
│ └── STATUS.md ~/repositories/ │
│ ├── dashboard.git (bare repo) │
│ └── claude-docs.git (bare repo) │
│ │
│ ~/scripts/ │
│ └── healthcheck.sh (cron 5min) Vérifie services et alerte via ntfy │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
| URL | Source | Contenu |
|---|---|---|
| https://dashboard.nowhere84.com | ~/public_html/dashboard/ | Mirror du dashboard local |
| https://status.nowhere84.com | ~/public_html/status/ | Page de status des services |
| https://claude.nowhere84.com | ~/public_html/claude/ | Viewer Markdown (tasks, propositions) |
| https://cdn.nowhere84.com | ~/public_html/cdn/ | Assets statiques (images, etc.) |
| Cron | Schedule | Script | Destination |
|---|---|---|---|
| Configs sync | 0 */2 * * * |
sync-configs-o2switch.sh | ~/backup/configs/ |
| PostgreSQL backup | 0 */6 * * * |
pg-to-o2switch.sh | ~/backup/postgresql/ |
| GitLab sync | 30 */6 * * * |
gitlab-to-o2switch.sh | ~/backup/gitlab/ |
| Dashboard push | 0 * * * * |
generate.sh (git push) | ~/public_html/dashboard/ |
| Claude docs push | Manuel | git push o2switch | ~/backup/claude/ |
| Cron | Schedule | Script | Action |
|---|---|---|---|
| Healthcheck | */5 * * * * |
~/scripts/healthcheck.sh | Vérifie services, alerte via ntfy |
| Redis | * * * * * |
(cPanel auto) | Maintient Redis actif |
Les repos Git utilisent des hooks post-receive pour déployer automatiquement :
PVE: git push o2switch main
│
▼
O2switch: ~/repositories/dashboard.git/hooks/post-receive
│
▼
git checkout -f main → ~/public_html/dashboard/
Repos configurés :
| Repo local | Remote | Bare repo O2switch | Deploy target |
|---|---|---|---|
| /stock_8to/33800-stack/monitoring | o2switch | ~/repositories/dashboard.git | ~/public_html/dashboard/ |
| /stock_8to/33800-stack/claude | o2switch | ~/repositories/claude-docs.git | ~/backup/claude/ |
| Type | Rétention | Localisation |
|---|---|---|
| Configs | Miroir temps réel | ~/backup/configs/ |
| PostgreSQL | 30 derniers dumps | ~/backup/postgresql/ |
| GitLab | 7 derniers backups | ~/backup/gitlab/ |
| Dashboard | Dernière version | ~/public_html/dashboard/ |
| Claude docs | Dernière version | ~/backup/claude/ |
Les fichiers PHP sur O2switch sont versionnés localement et synchronisés :
/stock_8to/33800-stack/scripts/o2switch/
├── public_html/
│ ├── claude/
│ │ ├── index.php # Viewer Markdown
│ │ └── vendor/Parsedown.php
│ ├── status/
│ │ └── index.php # Page de status
│ └── webhooks/
│ └── receive.php # Proxy webhooks
└── scripts/
└── healthcheck.sh # Monitoring externe
Ces fichiers sont synchronisés vers O2switch par sync-configs-o2switch.sh.
# Alias configuré dans ~/.ssh/config
Host o2switch
HostName yellow.o2switch.net
User deas8499
IdentityFile ~/.ssh/o2switch_rsa
IdentitiesOnly yes
# Usage
ssh o2switch
scp fichier o2switch:~/chemin/
En cas de panne de l'infrastructure locale :
ssh o2switch
ls ~/backup/configs/ # Configs critiques
ls ~/backup/postgresql/ # Dumps PostgreSQL
ls ~/backup/gitlab/ # Backups GitLab
| Log | Localisation | Contenu |
|---|---|---|
| Sync logs | /var/log/o2switch-sync.log | Toutes les synchro vers O2switch |
| Healthcheck | ~/logs/healthcheck.log (O2switch) | Résultats des checks |
Dernière mise à jour : 2026-01-15