# `mix lightning.adaptors.dump`
[🔗](https://github.com/OpenFn/lightning/blob/main/lib/mix/tasks/lightning.adaptors.dump.ex#L1)

Write this instance's adaptor catalogue to a JSON file, in the shape
`Lightning.Adaptors.Catalogue.upsert_adaptor/1` accepts and
`mix lightning.adaptors.import` reads back.

This is how adaptors get mirrored into an airgapped environment. Hydrate
an online instance as usual, dump it here, carry the file across, and
import it on the offline instance. `mix lightning.adaptors.snapshot`
produces the same kind of file by fetching npm directly, for when there
is no populated catalogue to dump from.

## Usage

    mix lightning.adaptors.dump --path snapshot.json
    mix lightning.adaptors.dump --path snapshot.json --source local

`--source` defaults to `npm`.

Icon bytes themselves live in the on-disk icon cache, not the catalogue,
so they don't travel in this file. It carries the icon metadata
(extension, sha256, etag) so an imported row can serve an icon already
present at `ADAPTORS_ICONS_PATH` on the target instance instead of
refetching from GitHub. Copy that directory across alongside this file.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
