# BACKUP / RESTORE TABLE — DynamoDB-managed snapshots

Take an on-demand DynamoDB-managed snapshot before risky work, then use the returned ARN to restore that snapshot into a **new table**. `BACKUP TABLE` lowers to `CreateBackup`; `RESTORE TABLE` lowers to `RestoreTableFromBackup`. Neither statement exports data to S3, mutates the source table, or overwrites an existing table.

## Syntax

```sql
BACKUP TABLE "table" AS 'backup-name';

RESTORE TABLE "new-table"
  FROM BACKUP 'backup-arn';
```

- **Backup name** — required and single-quoted. The run reports the created backup's ARN; keep it, because restore v1 accepts the ARN directly.
- **Restore target** — a new, quoted table name. It must not already exist.
- **No PITR prerequisite** — `CreateBackup` is an on-demand managed snapshot. It is distinct from point-in-time restore and from an S3 export.
- **Stage policy** — both are control-plane writes and a read-only stage refuses them.
- **Surfaces** — both run from the PartiQL console and Browse's PartiQL mode.

## Use cases

### Snapshot before a bulk migration

A previewed write will touch thousands of orders. Capture a named recovery point before approving the job.

```sql
BACKUP TABLE "stage.Orders" AS 'orders-pre-migration-2026-06-19';
```

_Executes as:_ CreateBackup · table stage.Orders · name orders-pre-migration-2026-06-19

- The status reports the backup ARN — the exact handle the restore statement needs.

_Quote this example:_ https://dynostudio.dev/docs/dynostudio-backup-restore/#pre-migration-backup

### Restore into an isolated table

Recover the snapshot for inspection without replacing or mutating the live orders table.

```sql
RESTORE TABLE "stage.OrdersRecovered"
  FROM BACKUP 'arn:aws:dynamodb:us-east-1:123456789012:table/stage.Orders/backup/01234567890123-example';
```

_Executes as:_ RestoreTableFromBackup · target stage.OrdersRecovered · source backup ARN

- The new table remains `CREATING` until DynamoDB reports it `ACTIVE`; the DDL receipt and Background Tasks panel track that lifecycle.

_Quote this example:_ https://dynostudio.dev/docs/dynostudio-backup-restore/#restore-new-table

> **One press, because neither operation destroys data:** Backup adds a snapshot and restore creates a new table, so they do not use DROP TABLE's type-the-name confirmation or the double-run index confirmation. Stage policy still applies, and the Executes-as strip still shows the native control-plane request first.

> **Restore is not rollback in place:** `RESTORE TABLE` never overwrites the source or an existing target. It creates a separate table; moving callers or data back is an explicit follow-up operation.

Related: [Tables, indexes, backups & replicas](https://dynostudio.dev/docs/dynostudio-partiql-ddl/) · [Bulk writes](https://dynostudio.dev/docs/dynostudio-partiql-writes/) · [CREATE / DROP TABLE](https://dynostudio.dev/docs/dynostudio-create-table/) · the [Bean & Bark safe-write lesson](https://dynostudio.dev/docs/dynostudio-bean-bark-safe-writes/).

---
_Source: https://dynostudio.dev/docs/dynostudio-backup-restore/ · DynoStudio Docs_
