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:
- Point
pds.3drx.topback to the old VM. - Wait for DNS/proxy propagation.
- Inspect logs on the new VM.
- Do not run writes on both VMs at the same time.