Skip to main content

Manual Backups

Create on-demand snapshots of your databases for migration, safety, or archival.


Creating a Backup

Via the API

curl -X POST https://api.lordbase.com/e/v1/developer/databases/{database_id}/backups/ \
-H "Authorization: Bearer lb_pat_your_token" \
-H "Content-Type: application/json" \
-d '{"name": "pre-migration-snapshot"}'

Response:

{
"id": "880e8400-e29b-41d4-a716-446655440003",
"database": "660e8400-e29b-41d4-a716-446655440001",
"database_name": "my-app-db",
"name": "pre-migration-snapshot",
"backup_type": "manual",
"status": "pending",
"created_at": "2026-01-15T12:00:00Z"
}

The backup runs asynchronously. Poll the backup detail endpoint to check status.


Listing Backups

curl -X GET https://api.lordbase.com/e/v1/developer/databases/{database_id}/backups/ \
-H "Authorization: Bearer lb_pat_your_token"

Restoring a Backup

curl -X POST https://api.lordbase.com/e/v1/developer/backups/{backup_id}/restore/ \
-H "Authorization: Bearer lb_pat_your_token"
warning

Restoring a backup will overwrite the current database contents. Create a new backup of the current state before restoring if needed.


Deleting a Backup

curl -X DELETE https://api.lordbase.com/e/v1/developer/backups/{backup_id}/ \
-H "Authorization: Bearer lb_pat_your_token"

Backup Details

FieldDescription
nameHuman-readable backup name
backup_typemanual or scheduled
statuspending, in_progress, completed, failed, restoring
file_size_mbBackup file size in megabytes
started_atWhen the backup process started
completed_atWhen the backup finished
expires_atAutomatic expiration date (if set)

Best Practices

PracticeDescription
Backup before migrationsAlways create a manual backup before schema changes
Verify restoresPeriodically test restore to a clone database
Clean up old backupsDelete backups you no longer need

Next Steps