# Part 8 — recovery

For when there is no device left to grant from.

```ts
const bundle = await engine.exportBundle('correct horse battery staple');
// a base64 string — every graph key this device holds, sealed under the passphrase

// on a brand-new device, after ArgalaEngine.open:
await engine.importBundle(bundle, 'correct horse battery staple');
```

- The passphrase must be at least 8 characters. Sealing is not optional: an
  unsealed bundle is a plaintext copy of the whole account.
- The bundle carries **graph keys only**. A restored machine is a _new_ device
  with its own keypairs that happens to already know the graph keys.
- Importing **wipes the local record store** and re-pulls, because a store
  half-filled from a previous identity is worse than an empty one.
- A wrong passphrase throws `wrong passphrase for this bundle`; anything that
  is not a bundle throws `that does not look like an argala recovery bundle`.

> **Lost keys mean lost data.** With every device gone and no recovery bundle,
> the ciphertext is unrecoverable. The relay cannot help. An app built on argala
> must tell its users so **in words, at the moment the first key is created** —
> not in a settings page nobody opens.

---
