Skip to Content
Disaster recoveryPlatformBackup

Read the status of the platform backup

GET
/apis/funcd.io/v1alpha1/platformbackup

Authorization

headerAuthorizationBearer <token>

A credential of funcd's config, sent as Authorization: Bearer followed by its token.

Response Body

OK

application/json
  1. response
earliestRestorePoint?string

When the oldest generation that funcd restore run can load was written.

Match^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
Formatdate-time
enabled*boolean

True when funcd runs the platform backup, which needs backup.target and storage.mode file.

held*boolean

True while the platform is held: the backups wait for the release. It reads false, as interval and rpo read 0s, when funcd runs no backup: under storage.mode memory, or with neither backup.target nor kvstore.backup.enabled set.

interval*string

How often the platform backup runs: backup.interval; 0s when funcd runs no backup.

Match^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$
lastFailure?

The last run that failed since funcd started; a run that succeeds clears it.

lastSuccessTime?string

When the newest complete generation on the target was written.

Match^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
Formatdate-time
lastVerifiedTime?string

When the newest generation that funcdctl backup verify checked was written; absent when none is verified or its original has expired.

Match^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
Formatdate-time
nextRunTime?string

When the next run is due.

Match^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
Formatdate-time
rpo*string

The most data that a loss may take: backup.objectives.rpo; 0s when funcd runs no backup.

Match^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$
rpoRisk*boolean

True when the platform backup is on and no verified generation is newer than backup.objectives.rpo; funcd then logs backup rpo at risk, and funcdctl backup verify clears it.

streams?

The runs of the other backups since funcd started, by stream: blob for the mirror of Blob's files, kv for the KV backup.

Example Request
curl -X GET 'https://example.com/apis/funcd.io/v1alpha1/platformbackup'
Example Response
{  "earliestRestorePoint": "2019-08-24T14:15:22Z",  "enabled": true,  "held": true,  "interval": "string",  "lastFailure": {    "error": "string",    "time": "2019-08-24T14:15:22Z"  },  "lastSuccessTime": "2019-08-24T14:15:22Z",  "lastVerifiedTime": "2019-08-24T14:15:22Z",  "nextRunTime": "2019-08-24T14:15:22Z",  "rpo": "string",  "rpoRisk": true,  "streams": {    "property1": {      "lastFailure": {        "error": "string",        "time": "2019-08-24T14:15:22Z"      },      "lastSuccessTime": "2019-08-24T14:15:22Z"    },    "property2": {      "lastFailure": {        "error": "string",        "time": "2019-08-24T14:15:22Z"      },      "lastSuccessTime": "2019-08-24T14:15:22Z"    }  }}

Answers

StatusProblem typeWhenWhat to do
200OK
401urn:funcd:problem:unauthorizedThe request carries no bearer token or API key, or one that funcd does not know.Send a credential of funcd's config as a bearer token in the Authorization header, or in X-Api-Key.
403urn:funcd:problem:forbiddenThe credential's role does not allow it to read the status of the platform backup: only an admin's does.Use an admin's credential.
503urn:funcd:problem:unavailablefuncd could not list backup.target, where the platform backup writes: the bucket does not exist, the URL is wrong, or the target fails.Check backup.target and the key of backup.credentialsFile, then read the status again.