Sofa
Admin

Restore from backup

Upload a database backup file and restore it. A pre-restore backup is automatically created before overwriting the current database.

POST
/admin/backups/restore
better-auth.session_token<token>

Better Auth session cookie

In: cookie

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "http://localhost:3000/api/v1/admin/backups/restore" \  -F file="string"
Empty
{
  "defined": true,
  "code": "BAD_REQUEST",
  "status": 400,
  "message": "Backup restoration failed",
  "data": {
    "code": "BACKUP_RESTORE_FAILED"
  }
}