---
url: /api/kiln/functions/restoreSnapshot.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / restoreSnapshot

# Function: restoreSnapshot()

```ts
function restoreSnapshot(app, snap): object;
```

Replaces the app's entities with the snapshot's. Traits are looked up by name, so a snapshot
taken before a code change restores into the new code; unknown traits are reported, not lost
silently. Entity ids are remapped; relations follow the remap.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `app` | [`App`](../classes/App.md) |
| `snap` | [`Snapshot`](../interfaces/Snapshot.md) |

## Returns

`object`

### missingTraits

```ts
missingTraits: string[];
```
