Skip to main content

startBackupRestore

BackupProgressWrapper startBackupRestore(StartBackupRestoreRequestDto)

POST /api/2.0/backup/startrestore

Start the restoring process

Queues the restoring of the current portal from a backup and returns straight away: the work itself is done by the separate backup worker service, which picks the job up from an integration event, so the response reports a progress of 0 and the Created status, and the returned taskId is the handle to poll with GET api/2.0/backup/getrestoreprogress - the one operation of this service that stays reachable while the portal is being restored, because every other one answers 403 in that state. The source is given either by backupId, which is the ID of a record from GET api/2.0/backup/getbackuphistory, or, when backupId is not a GUID, by the filePath key of storageParams together with the matching storageType; an all-zero GUID is parsed as a GUID and therefore reaches neither branch. The caller needs the portal settings permission, restoring has to be allowed by the pricing plan of a portal that is not a standalone installation, and dump - restoring the whole server rather than this one portal - additionally requires the space access permission.

Parameters​

NameInTypeDescriptionNotes
StartBackupRestoreRequestDtobodyStartBackupRestoreRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The state of the queued restoring jobBackupProgressWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no backupId, or storageParams repeats a key--
402The pricing plan of this portal does not allow restoring--
403No permissions to perform this action--
404The backup record was not found, the file given in filePath or its folder was not found, or, for Local storage, no backup archive has been uploaded to the portal--
500backupId is not a GUID and storageParams has no filePath, or a key or value of storageParams is null--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

BackupProgressWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json