# Runbook: Platform VM / Lab Host VM Rebuild Both VMs are designed to be disposable and rebuildable from code — nothing irreplaceable should ever live only on either VM's disk outside of what's backed up (`docs/BACKUP_DR.md`). ## rn-platform-01 lost Academic data survives (it's in Postgres backups, off-host). Instructor/student accounts and progress are recoverable; anything since the last backup is not (`docs/BACKUP_DR.md`'s RPO). ```bash cd infra/terraform && terraform apply # recreates the VM from the template cd ../ansible && ansible-playbook site.yml -i inventory/production.ini --limit platform --ask-vault-pass # Then restore Postgres — docs/RUNBOOK_POSTGRES_RESTORE.md, step 5b variant (fresh DB this time, # no need to rename since it's a fresh instance) ./infra/scripts/production-smoke-test.sh ``` ## rn-lab-host-01 lost **No academic data is lost** — this host only ever holds disposable Lab containers by design (`docs/BACKUP_DR.md`'s Tier distinction). Every enrolled student's Lab needs re-provisioning after this, which is a normal "Prepare Labs" click, not a recovery operation. ```bash cd infra/terraform && terraform apply cd ../ansible && ansible-playbook site.yml -i inventory/production.ini --limit lab_host --ask-vault-pass # Re-generate Docker TLS material for the new host if its identity (IP/DNS) changed — # docs/RUNBOOK_DOCKER_TLS_ROTATION.md # From /admin: Prepare Labs again for any cohort that needs it. ```