Run it
Updating and recovering Orbit
Before an update, save the deployed edition commit and source lock, .rer/, and the Worker secret configuration in private storage. Keep the source installation intact. Wait for pending sends and reconciliation to settle, pause source intake and scheduled processing, and stop customer writes until validation finishes. Do not replay messages to check an update.
Use Orbit’s authenticated Records archive for a hosted backup. Raw D1 SQL export is not a supported Orbit backup: its FTS5 search tables prevent that export. Sign in by an ordinary email link shortly before exporting (archive operations require an email confirmation within 10 minutes). Save only the current __Host-orbit_session=... cookie in an owned 0600 file under ignored .rer/, then run:
rer export --target remote --origin https://your-origin.example --session-file .rer/orbit-cookie --output exports/orbit-before-update.json
Wait for Verified archive saved and copy the completed 0600 archive outside the checkout into private backup storage. Keep partial downloads and checkpoints private too. A previously prepared export is an immutable snapshot: in Settings › Data › Export and restore, choose Find unfinished exports, Use export (listed by start time and size) and Resume export to download it, or explicitly Discard export and Prepare export for a current backup. The remote CLI does not forward --resume; interrupted transfers resume through Settings › Data › Export and restore. Never assume a repeated export includes later edits.
The hosted format is orbit-export version 3, generation orbit-fold-1. It retains native operators, domain records, anonymous suppression/erasure proofs and their private matching contexts. It excludes sessions and identity proofs, owner bootstrap/first-run metadata, rate limits and runtime state, collaborator grants/invitations/form authority, delegation credentials, capture credentials/OAuth/leases, private CSV originals and import custody, archive bookkeeping and search indexes. Signal source secrets are omitted. Search is rebuilt on restore. Worker secrets are separate; reconnect capture sources and reconfigure signal source secrets afterwards. OPERATIONS.md describes the transfer and exclusions. Archives contain confidential customer data, not a transferable signed-in session.
Deploy the candidate with rer deploy --environment NAME, which applies migrations and uploads the matching Worker. A completed owner claim stays completed on updates. Verify customer records, drafts, outbound states, provider IDs and audit history before resuming work. Preserve applied migration names and bytes and the owner’s recorded intent.
0042_record_ownership.sql is the one reviewed exception, declared in migrations/. Its first release (17 October 2026) added owner columns to contacts and companies, which cannot apply where an owner has already filled contacts to D1’s 100-column limit. It now changes no schema, and record ownership is withdrawn until it returns in separate ownership tables. An installation that applied the first release keeps that migration recorded as applied, with its added columns and tables left in place and unused, and rer deploy accepts it. The replacement migration will copy any owners from those columns into the new tables before it removes the columns.
If validation fails, keep processing stopped and preserve the failed installation for diagnosis. Restore into a separate clean environment, using the saved edition that produced the archive or a verified compatible edition. Do not run an older Worker against a newer schema. Version 2 archives retain supported native-lineage compatibility; version 3 restore requires its supported generation and matching schema.
-
From the saved committed checkout, deploy a new environment, for example
rer deploy --environment recovery. Keep its deployment receipt separate. Supply authentication mail only; leave customer delivery, provider relays, capture intake and AI inactive. The temporary recovery owner signs in through an actual native email link; do not add customer records. -
Copy the source archive into that checkout’s private
exports/directory. Save the recovery owner’s fresh cookie in its own 0600.rer/file. Restore through Settings › Data › Export and restore, or:recovery-cookie rer import --target remote --origin https://recovery-origin.example --session-file .rer/recovery-cookie --input exports/orbit-before-update.json --yes -
Finish or resume the transfer under Settings › Data › Export and restore using the same archive; Find unfinished restores lists it by start time and size. A successful restore retains current full operators, imports new archived operators as ordinary operators and keeps the current hosted owner active, preserving access through the recovery owner’s real mailbox. It revokes all sessions; request a new native sign-in link for that owner at
/signin, follow it and press Confirm. Matching operator IDs keep the target identity. Matching mailboxes retain the archive ID for historical attribution and keep current access, name and owner status; an ID that conflicts with another current mailbox is refused before changes. Resolve that collision in the source and export again. Confirm access before activation. -
Compare restored records, outbound states and audit history with the backup, allowing the restore audit entry. Re-export and verify the domain inventory if needed. Reconfigure required Worker secrets and source connections separately, then deliberately review pending outreach before enabling customer delivery. Do not subscribe a recovery test Worker to production relays or replay pending messages.
Changes accepted after the backup need explicit reconciliation. Retain the source until the recovery has been verified and intentionally activated. Remove private cookie files when finished.
Stop dev and preview before every local CLI export or import. For local installations the separate format is rer export --output exports/. After rer reset --yes, restore with rer import --input exports/, then rer setup --owner-email using the archive’s owner. CLI local archives and Records archives are different formats. To move local data to hosted, use Settings › Data › Export and restore › Export archive in the local app, then Settings › Data › Export and restore › Restore archive on hosted as above.
Migration 0006_signals_outreach.sql preserves outbound IDs, drafts, revisions and states while extending the schema. Existing IDs become durable idempotency keys and determine stable RFC message IDs; approval time uses original creation time. It does not send or resubmit messages. The existing tests/ checks the migration’s transactional rollback on disposable local databases; its SQL fixture is a migration test, not the hosted backup procedure.