Personal atproto services deployment handbook
atstack docs restore.md
1.9 kB · 80 lines
Markdown
at main

Restore #

This procedure restores /pds from an R2 backup. It applies to a new GCP VM or another cloud provider.

Requirements #

  • New Linux VM with Docker and Docker Compose plugin installed.
  • DNS can be pointed to the new VM when ready.
  • R2 backup credentials available outside Git.
  • Cloudflare Origin CA certificate and private key available, or a plan to generate a replacement certificate.
  • The live blob bucket remains intact.

Restore to a Test Directory #

Before restoring production, validate the archive:

scripts/restore-pds.sh --object '<backup-object-key>' --target /tmp/pds-restore-test

Inspect the restored tree:

find /tmp/pds-restore-test -maxdepth 2 -type f | sort

Restore to /pds #

On the target VM:

sudo mkdir -p /pds
sudo scripts/restore-pds.sh --object '<backup-object-key>' --target /pds --force

The script refuses to overwrite a non-empty target without --force.

Recreate Services #

Use the deployment docs and templates to reinstall the service wrapper, Docker setup, Caddy config, and backup timer.

Do not create a new PDS account during restore. The restored /pds should contain the existing account state.

Cut Over DNS #

Update Cloudflare:

pds.3drx.top A <new-vm-ip> proxied

Keep:

_atproto.3drx.top TXT did=did:plc:<existing-did>

Do not change the handle TXT unless the DID changed, which should not happen during a normal restore.

Validate #

Run:

scripts/healthcheck.sh

Then verify login through service https://pds.3drx.top, image loading, and WebSocket connectivity.

Rollback #

If the new VM fails before DNS cutover, keep the old VM untouched.

If failure happens after DNS cutover:

  1. Point pds.3drx.top back to the old VM.
  2. Wait for DNS/proxy propagation.
  3. Inspect logs on the new VM.
  4. Do not run writes on both VMs at the same time.