255 lines
5.8 KiB
Markdown
255 lines
5.8 KiB
Markdown
# `GET /backup`
|
|
|
|
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
|
|
|
List backups and service status
|
|
|
|
Retrieves the current status of the internal backup service and lists available hourly, daily, and monthly backups.
|
|
|
|
## Response `200`
|
|
|
|
Backup service status and listing
|
|
|
|
```json
|
|
{
|
|
"status": {
|
|
"enabled": true,
|
|
"isRunning": true,
|
|
"dbProvider": "…",
|
|
"mssqlWarning": true,
|
|
"backupDir": "…",
|
|
"retention": {
|
|
"hourlyMax": 1,
|
|
"dailyMax": 1,
|
|
"monthly": "…"
|
|
},
|
|
"counts": {
|
|
"hourly": 1,
|
|
"daily": 1,
|
|
"monthly": 1
|
|
},
|
|
"latestHourly": {
|
|
"name": "…",
|
|
"path": "…",
|
|
"totalSizeBytes": 1,
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"manifest": {
|
|
"id": "…",
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"dateKey": "…",
|
|
"monthKey": "…",
|
|
"dbProvider": "…",
|
|
"files": {
|
|
"vfs": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"storage": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"database": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"backedUp": true,
|
|
"reason": "…"
|
|
}
|
|
},
|
|
"totalSizeBytes": 1,
|
|
"durationMs": 1
|
|
}
|
|
},
|
|
"latestDaily": {
|
|
"name": "…",
|
|
"path": "…",
|
|
"totalSizeBytes": 1,
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"manifest": {
|
|
"id": "…",
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"dateKey": "…",
|
|
"monthKey": "…",
|
|
"dbProvider": "…",
|
|
"files": {
|
|
"vfs": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"storage": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"database": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"backedUp": true,
|
|
"reason": "…"
|
|
}
|
|
},
|
|
"totalSizeBytes": 1,
|
|
"durationMs": 1
|
|
}
|
|
},
|
|
"latestMonthly": {
|
|
"name": "…",
|
|
"path": "…",
|
|
"totalSizeBytes": 1,
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"manifest": {
|
|
"id": "…",
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"dateKey": "…",
|
|
"monthKey": "…",
|
|
"dbProvider": "…",
|
|
"files": {
|
|
"vfs": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"storage": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"database": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"backedUp": true,
|
|
"reason": "…"
|
|
}
|
|
},
|
|
"totalSizeBytes": 1,
|
|
"durationMs": 1
|
|
}
|
|
}
|
|
},
|
|
"backups": {
|
|
"counts": {
|
|
"hourly": 1,
|
|
"daily": 1,
|
|
"monthly": 1
|
|
},
|
|
"hourly": [
|
|
{
|
|
"name": "…",
|
|
"path": "…",
|
|
"totalSizeBytes": 1,
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"manifest": {
|
|
"id": "…",
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"dateKey": "…",
|
|
"monthKey": "…",
|
|
"dbProvider": "…",
|
|
"files": {
|
|
"vfs": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"storage": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"database": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"backedUp": true,
|
|
"reason": "…"
|
|
}
|
|
},
|
|
"totalSizeBytes": 1,
|
|
"durationMs": 1
|
|
}
|
|
}
|
|
],
|
|
"daily": [
|
|
{
|
|
"name": "…",
|
|
"path": "…",
|
|
"totalSizeBytes": 1,
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"manifest": {
|
|
"id": "…",
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"dateKey": "…",
|
|
"monthKey": "…",
|
|
"dbProvider": "…",
|
|
"files": {
|
|
"vfs": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"storage": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"database": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"backedUp": true,
|
|
"reason": "…"
|
|
}
|
|
},
|
|
"totalSizeBytes": 1,
|
|
"durationMs": 1
|
|
}
|
|
}
|
|
],
|
|
"monthly": [
|
|
{
|
|
"name": "…",
|
|
"path": "…",
|
|
"totalSizeBytes": 1,
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"manifest": {
|
|
"id": "…",
|
|
"timestamp": "2026-08-10T00:00:00.000Z",
|
|
"dateKey": "…",
|
|
"monthKey": "…",
|
|
"dbProvider": "…",
|
|
"files": {
|
|
"vfs": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"storage": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"sourceExists": true
|
|
},
|
|
"database": {
|
|
"name": "…",
|
|
"sizeBytes": 1,
|
|
"backedUp": true,
|
|
"reason": "…"
|
|
}
|
|
},
|
|
"totalSizeBytes": 1,
|
|
"durationMs": 1
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
```
|
|
|
|
## Errors
|
|
|
|
| Status | Description |
|
|
|--------|-------------|
|
|
| 500 | Internal error — `{"error":"…"}` |
|
|
|
|
---
|
|
|
|
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|