homelab-brain/arakava-news/scripts/README-mirror-sync.md
Homelab Cursor e41bb43024 add wp-mirror nightly sync CT101 to CT600
Read-only mysqldump and tar pull; safe for production WordPress on CT101.
2026-06-28 19:09:30 +02:00

42 lines
1 KiB
Markdown

# CT600 wp-mirror Sync
Nächtlicher Pull **CT101 → CT600** auf **pve-mu-3**.
## CT101-Sicherheit
| Operation | Auswirkung auf CT101 |
|-----------|----------------------|
| `mysqldump --single-transaction --quick` | Read-only Snapshot, ~10 s, keine Table-Locks (InnoDB) |
| `tar` aus Docker-Volume | Nur Lesen, kein Container-Restart |
| Health-Check vor/nach Sync | Abbruch wenn Primary down |
**Nicht** gemacht: `docker restart`, `mysqladmin flush`, Schreibzugriffe, Plugin-Updates.
## Deployment
| Ort | Pfad |
|-----|------|
| Git | `arakava-news/scripts/wp-mirror-sync.sh` |
| pve-mu-3 | `/opt/wp-mirror-sync/sync-from-101.sh` |
| Log | `/var/log/wp-mirror-sync.log` |
| Staging | `/opt/wp-mirror-sync/staging/` |
## Cron (pve-mu-3)
```
0 4 * * * root /opt/wp-mirror-sync/sync-from-101.sh >> /var/log/wp-mirror-sync.log 2>&1
```
## Failover pausieren
```bash
touch /opt/wp-mirror-sync/FAILOVER_ACTIVE
# nach Failback:
rm /opt/wp-mirror-sync/FAILOVER_ACTIVE
```
## Manuell
```bash
ssh pve-mu-3 '/opt/wp-mirror-sync/sync-from-101.sh'
```