User Tools

Site Tools


api:pbx:backup:restorestored

API : PBX : Backup restore stored

Introduction

Restores a PBX backup that is stored on the file server onto a target customer. The target may be the customer the backup was taken from (disaster recovery) or another customer (deploying a template).

The restore semantics, modes (replace / deploy), dryRun option and the returned restore report are identical to Restore - see that page for the full description including all warning types.

Request

URL https://api.telecomx.dk/pbx/backup/<id>/restore
Method POST
Access level OWNER if both the backup and the target belong to the users own customer.
RESELLER if the customers belong to the reseller.
RESELLER_ADMIN and ADMIN for all customers.
The user must have access to both the backups customer and the target customer.
Params id Id of the stored backup.
Body customer [optional] Id of the target customer. Defaults to the users own customer.
mode Restore mode: replace or deploy.
include [optional] Array (or comma separated string) of categories to restore. Defaults to everything the backup contains. Must be categories that exist in the backup.
dryRun [optional] true to only validate and report conflicts without changing anything. Default false.

Body example

{
  customer: '12345678901234567890ABCD',
  mode: 'deploy',
  include: [ 'dialplan', 'audio' ],
  dryRun: true
}

Response

The restore report - see Restore for the full definition, warning types and an example.

Errors

Error code Message Description
403 access_denied Insufficient access level
404 id Backup not found
404 customer Customer not found
404 id The backup file was not found on the file server
409 restore A restore is already running for this customer
422 file The file is not a valid PBX backup, or has a newer format version than the server supports
422 include The backup does not contain the selected categories
500 internal_error <Unspecified>
api/pbx/backup/restorestored.txt · Last modified: by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki