.gsb files and private keys offline and protected.
Before you start
- You need a device with access to the target environment (it must already be a recipient of the environment key).
- Optional: an organization recovery X25519 public key to include as a second recipient for the Backup Data Key (BDK).
- Understand the posture: no server-side escrow, no rewrapping, and no restore-time policy checks.
Create a backup (online)
Run the CLI while authenticated and on a device that can read the environment key.- The API verifies authorization, fetches the already-encrypted environment bundle, generates a one-time BDK, and envelope-encrypts that BDK to:
- Your requesting device
- (Optional) the supplied recovery public key
- The CLI does not decrypt anything; it writes the returned envelope verbatim to a
.gsbfile (default.ghostable/backups/...gsb, which is ignored by Git). - Warnings shown during creation are intentional: backups are non-revocable and keys included at creation are the only ones that can ever restore.
Restore offline (API-free)
Restores happen locally and require a matching private key from backup creation.- Validate the envelope format and integrity hash.
- Find a matching recipient:
- Device private key stored on this machine, or
- Provided organization recovery private key.
- Decrypt the BDK, then the payload, then the environment key envelope, and finally the secrets.
- Require an explicit output target (
--to-fileor--print). Nothing is exported implicitly. - Zeroize sensitive material in memory and exit. No API calls are made.
(Optional) Generate a recovery key
If you want an organization-held recovery path in case all devices are lost:- Generates an X25519 keypair locally.
- Use the printed/public key with
ghostable backup create --recovery-key <BASE64_PUB>. - Store the private key offline; use it on restore with
--recovery-private-keyor--recovery-key-file.
Envelope format (high level)
Backups return a JSON envelope saved as.gsb:
bundle: The encrypted environment projection (secrets stay encrypted under the environment key).meta: Backup identifiers (project, environment, backup_id, created_at).
Operational notes
- Backups are rare, deliberate artifacts—store them offline with corresponding private keys.
- Adding users later does not grant access to existing backups; removing users does not revoke access.
- There is no server-side escrow or rewrapping; if keys are lost, the backup is irrecoverable.
- Ghostable remains the system of record; backups are for last-resort recovery and vendor exit assurance.