# Move a connector's records onto a changed mapping (/use/rewrite-connector-records)

Ask a plugin's connector to move the records it already brought onto the type its mapping names now.



Saving [a mapping](/use/map-a-connector) changes no item. The records a connector already brought stay where they landed. **A rewrite asks the connector to move them** onto each kind's target, filling the fields as the mapping says. Map a kind back onto its own type, or onto another type, and a rewrite brings its records along. [The connector kit](/reference/connector-kit#on-the-way-back) says which edits made in Marfa are kept and sent on. Each command needs `connectors.manage`.

## Count what a rewrite would move [#count-what-a-rewrite-would-move]

```bash
marfa plugins mapping rewrite rss --dry-run
```

The line is `a rewrite of <name> would move <kind>: <count> onto <type>`, one kind after another. The count is that kind's records outside the bin, on the types the rewrite moves from. Records already on the target are not counted. A kind that is turned off counts nothing, and its items stay where they are.

## Ask for the rewrite [#ask-for-the-rewrite]

```bash
marfa plugins mapping rewrite rss --kind entry
```

The line is `asked <name>'s connector to move <kind>: <count> onto <type>, as request <number>`. Without `--kind`, the command asks for every kind that is on. Marfa stores a numbered request. The connector carries it out on its next run, then clears it. Until then, `marfa plugins mapping show rss` lists the request under `rewrites`. Asking again before the connector runs stores another request.

While a request waits, the connector can read its own records on a type the kind was mapped onto before, and move them onto the target. It does not create or edit records on that former type, and it never reaches your own records or another source's. That reach ends when the connector clears every request for the kind.

An archive carries requests that are still waiting, so a rewrite after a restore moves the same records ([Move your data with an archive](/run/export-and-restore)).

The rules are in the [plugins](https://github.com/withmarfa/marfa/blob/main/conformance/spec/plugins.md#rewriting-existing-items) chapter of the contract.
