# Fase 3: Cluster Formation (Week 7-8)

Target: Formar cluster 2-node, HA, cleanup

## 3.1 Preparar server.descomplicar.pt como Node A

```bash
# APENAS apos Fase 2 100% validada

# Backup final completo
tar -czf /tmp/final-backup-server.tar.gz /etc /home /var/www

# Reformatar com Proxmox (/proxmox-setup)
# Tornar Node A do cluster
```

## 3.2 Cluster Formation

```bash
/proxmox-cluster create --node-a server.descomplicar.pt --node-b cluster.descomplicar.pt
```

## 3.3 HA Configuration

```bash
/proxmox-ha configure --critical-vms 200,300
```

## 3.4 Cleanup

```bash
# Cancelar easy.descomplicar.pt VPS (apos validacao)
# Backup final de tudo
# Documentar nova arquitectura
```

---

## Backup Strategy Durante Migration

### Fase 1 (EasyPanel)

3 locais:
1. Containers em easy.descomplicar.pt (original)
2. PBS Node B backup
3. easy.descomplicar.pt VPS backup (mantido durante Fase 1)

### Fase 2 (CWP)

Safety net 7 dias:
1. Server antigo intacto (rollback rapido)
2. VM CWP -> PBS backups automaticos
3. Backups manuais /mnt/migration/

RPO: 1h (PBS backups hourly se critical)
RTO: 2-4h (restore + DNS propagation)

### Fase 3 (Cluster)

Redundancia completa:
1. VMs em Node A + Node B
2. PBS primary (Node B 16TB)
3. PBS secondary remote sync (Node A 12TB)
