Backup
Base path: /api/backup
GET /backup/export
Download a full backup as a ZIP file.
Auth: Admin
Response: ZIP file download containing:
meta.json— backup metadata: version, creation timestamp, and row counts per tabledata.json— all database table data in FK-safe orderuploads/— directory with all uploaded files (logos, packing slips)
The ZIP covers 40+ tables including settings, clients, bookings, POS orders, inventory, campaigns, gift cards, loyalty, audit log, and more.
Headers:
Content-Type: application/zip
Content-Disposition: attachment; filename="salonerp-backup-2026-03-25.zip"
POST /backup/import
Import a backup ZIP file, replacing all existing data.
Auth: Admin
Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | Backup ZIP (max 500MB) |
Response (200):
{
"ok": true,
"tables_restored": 42,
"rows_restored": 1856
}
warning
This endpoint deletes all existing data before importing. It cannot be undone. Only use this on a fresh installation or when you have verified the backup file.
tip
The initial-setup endpoints (POST /api/auth/setup and GET /api/auth/setup-status) are documented in the Authentication section.