Restore backup
restore_backupRestore an app's D1 database from a backup: {app, binding?, backup_id, confirm} with confirm equal to backup_id. Takes a fresh backup first, then replaces the live tables with the dump. Owner only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"app": "<app>",
"backup_id": "<backup_id>",
"confirm": "<confirm>"
},
"name": "restore_backup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | The app slug. | |
| binding | No | The D1 binding. Omit to use the app's only declared binding. | |
| confirm | Yes | Must equal `backup_id`: restoring overwrites the live database (a fresh backup is taken first, so a bad restore is itself restorable). | |
| backup_id | Yes | The backup id to restore, from `list_backups`. |