# Trigger backups and restores through the API

> Start a backup of your app or restore it from an earlier backup through the REST API, and find backup IDs and results in the backup logs.

Source: https://tadabase.com/docs/developers/backups-api  
Status: Verified Nov 17, 2026. Checked against the current product

Take a backup of your app before a large import or a scheduled change from another system, and restore it if something goes wrong. These endpoints start the same backups and restores as the builder; see [Backing up and restoring your app](https://tadabase.com/docs/settings/backing-up-and-restoring-your-app).

## Before you start

- Your plan must include API access.
- Turn on **Allow Backups & Restores** on the API key in **Settings** > **API Keys**. Without it, calls answer `412` with "The method being used is disabled for this API key."
- To find backup IDs and follow results, the key also needs **Allow Logs** (see [Read app logs through the API](https://tadabase.com/docs/developers/logs-api)).

> **Warning:** A restore overwrites the app's live data with the backup. Give **Allow Backups & Restores** only to a key that needs it, and keep that key on your server.

![The API key form in Settings with the Allow Backups & Restores switch highlighted](https://tadabase.com/docs-shots/developers-api-key-allow-backups.webp)

## Take a backup

```bash
curl -X POST https://api.tadabase.io/api/v1/backups/trigger \
  -H "X-Tadabase-App-Id: YOUR_APP_ID" \
  -H "X-Tadabase-App-Key: YOUR_API_KEY" \
  -H "X-Tadabase-App-Secret: YOUR_API_SECRET"
```

```json
{
  "type": "success",
  "msg": "Backup has been queued and will be processed shortly",
  "queued": true
}
```

The backup runs in the background as a manual backup. Send `include_logs=true` to include the app's log tables in it. To see when it is done, read `GET /api/v1/logs/backups`: the newest entry is first, with its `backup_id`, `status`, `start_at`, `end_at`, `total_tables` and `file_size_bytes`.

## Restore a backup

1. **Find the backup** Call `GET /api/v1/logs/backups` and copy the `backup_id` of the backup you want.
2. **Start the restore** Call `POST /api/v1/restores/trigger` with `backup_id`. The restore runs in the background.
3. **Check the result** Call `GET /api/v1/logs/restores`. The newest entry shows the restore's `status`, `start_at` and `end_at`.

```bash
curl -X POST https://api.tadabase.io/api/v1/restores/trigger \
  -H "X-Tadabase-App-Id: YOUR_APP_ID" \
  -H "X-Tadabase-App-Key: YOUR_API_KEY" \
  -H "X-Tadabase-App-Secret: YOUR_API_SECRET" \
  -d "backup_id=BACKUP_ID"
```

```json
{
  "type": "success",
  "msg": "Restore has been queued and will be processed shortly",
  "queued": true,
  "backup_id": "BACKUP_ID"
}
```

## Common problems

| Response | Cause |
| --- | --- |
| `412` "The method being used is disabled for this API key." | **Allow Backups & Restores** is off on the key |
| `400` "backup_id parameter is required" | Send the `backup_id` of the backup to restore |
| `404` "Backup not found or does not belong to this app" | The ID is wrong or is a backup of another app |
