Files
akyldash/docs/operations/RECOVERY.md
T
2026-10-11 18:27:15 +03:00

1.7 KiB

Recovery on a clean VPS

Scope and safety

The bootstrap below prepares Ubuntu packages and directories only. It is not a complete recovery: production secrets, data, reverse proxy, TLS, registry credentials, backup restore, and deploy-helper still require owner-controlled setup. Run only on the new recovery host after verifying its identity. Never run recovery commands against the existing production by accident.

Procedure

  1. Provision a clean Ubuntu Server 24.04 host and confirm hostname, IP, console access, and a tested owner recovery path.
  2. Create the SSH-authorized codex account without sudo or Docker group access. Preserve the host's existing root SSH and firewall policy until an owner has reviewed the change.
  3. Check out the approved Git revision and run sudo bash infra/bootstrap/bootstrap-ubuntu-24.04.sh. It installs Docker Engine, Compose, Git, Docker log limits, and target directories.
  4. Install the reviewed reverse proxy and its HTTPS configuration after DNS points to the recovery host. Verify Cloudflare Full (strict) end to end.
  5. Provide production configuration and secret files through the owner's protected channel; never commit or paste secret values into chat.
  6. Restore the latest verified backup to the new host. Validate SQLite databases, corpus checksums, and the OpenSearch snapshot/index before serving traffic.
  7. Start the approved image digest, verify container health and https://akyldash.kg/review, then record actual versions and checks in CURRENT_STATE.md.

Do not repoint DNS or retire the old host until the owner verifies recovery and approves the cutover. The restore and cutover have not been practiced yet.