Skip to content

Flow Scheduler Backup API

The Flow Scheduler Backup API (/fss/backup) starts a backup of one node's Flow Scheduler database and configuration from a script and reports how it ended.

Scope

Item Behaviour
What is backed up The Flow Scheduler database and configuration of the node whose MetaMiner Server (MMS) you call
Per node Each node backs itself up to its own disk. To cover both nodes of a high-availability pair, call each node directly, not the load balancer.
Who may call An admin API client without environment or site limits (403 FORBIDDEN otherwise). See Manage API Clients.
Restore There is no restore API. See Backup and Restore.
Flow Scheduler switched off Calls fail until it is switched on
Audit A refused call (403) is recorded in the API audit. A successful backup is not; the MMS log records it. See Audit Trail.

Base URL: https://<mms-host>:<port> (default port 49714; http:// only when SSL is not enabled on MMS).

Start a backup

POST /fss/backup - an admin API client without environment or site limits.

Starts a backup on this node and waits for the outcome. If a backup is already running on the node, the call attaches to it ("attached": true) and reports that run's outcome instead of failing.

Field Required Meaning
label No Text added to the backup folder name
waitSeconds No How long the call waits for the outcome: default 600, 0 to 3600. 0 returns at once with the job id.

The body is optional. The answer carries the backup job's fields, backupJobId, attached, and result:

200 OK (excerpt)
{
  "backupJobId": "<job-id>",
  "state": "succeeded",
  "folder": "<backup folder>",
  "dumpScope": "full",
  "expectedTablesPresent": true,
  "configConsistent": true,
  "fullDrCapable": true,
  "attached": false,
  "result": "ok"
}
Status result Meaning
200 ok The backup finished and was verified
202 pending Still running after waitSeconds; poll GET /fss/backup/status/{backupJobId}
400 Body is not JSON
401 / 503 See Status Codes and Errors
403 FORBIDDEN: not an admin client without environment or site limits
409, 502, 503 The backup could not start; the Flow Scheduler's reason is relayed
413 Body over 64 KiB
500 failed The backup ran and failed; error says why
502 error The job is no longer known to the Flow Scheduler (for example, it restarted during the wait), or MMS lost contact with it during the wait. Check GET /fss/backup to see whether the backup landed.

Treat the HTTP status as the verdict: alert on anything but 200.

curl -sS -X POST "https://<mms-host>:<port>/fss/backup" --max-time 960 \
  -H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
  -d '{"label": "nightly", "waitSeconds": 900}' -w '\nHTTP %{http_code}\n'
$r = Invoke-WebRequest -UseBasicParsing -Method Post -Uri "https://<mms-host>:<port>/fss/backup" -TimeoutSec 960 `
  -Headers @{ Authorization = "Bearer <token>" } -ContentType "application/json" `
  -Body '{"label": "nightly", "waitSeconds": 900}'
if ($r.StatusCode -ne 200) { throw "Flow Scheduler backup did not finish OK: $($r.StatusCode)" }

For backups that can outlive your HTTP timeout, send {"waitSeconds": 0} and poll the job.

Read node backup info

GET /fss/backup (or GET /fss/backup/info) - an admin API client without environment or site limits.

Returns this node's backup configuration, schedule, history and recent attempts. Use it as a monitoring probe: alert when the newest history entry is older than your backup cadence, or when attempts shows failures.

Status Meaning
200 Info returned
401 / 503 See Status Codes and Errors
403 FORBIDDEN
404 Any other GET path under /fss/backup
curl -sS "https://<mms-host>:<port>/fss/backup" -H "Authorization: Bearer <token>"
Invoke-RestMethod -Uri "https://<mms-host>:<port>/fss/backup" -Headers @{ Authorization = "Bearer <token>" }

Poll a backup job

GET /fss/backup/status/{backupJobId} - an admin API client without environment or site limits.

Returns the job's state: running, then succeeded or failed.

Status Meaning
200 Job state returned
404 {"error": "backup job not found", "detail": "JOB_NOT_FOUND"}: unknown job id
curl -sS "https://<mms-host>:<port>/fss/backup/status/<job-id>" -H "Authorization: Bearer <token>"
Invoke-RestMethod -Uri "https://<mms-host>:<port>/fss/backup/status/<job-id>" `
  -Headers @{ Authorization = "Bearer <token>" }