Previous Topic

Next Topic

Book Contents

Book Index

Backup Admin Service JSON-RPC API

A description of the Methods and Objects exported by the JSON-RPC Resource Provider.

Methods

Method

Return Value

Parameters

Parameter Description

BACKUP/listProviders

BackupProviderInfo[]

BACKUP/backup

BackupResult. Error if backup operation has failed for some reason.

  • backup properties: JSONObject
  • provider info: BackupProviderInfo[]
  • backup properties: JSONObject – The URL timeout, local backup, the backup filename, etc.
  • provider info: BackupProviderInfo[] – Optional. The Backup Providers on which the backup operation should be executed. In case the field is missing, backup will be executed on all Backup Providers.

BACKUP/restore

MutliBackupStatus. Error if restore operation has failed for some reason.

  • restore properties: JSONObject
  • location: String
  • provider info: BackupProviderInfo[]
  • restore properties: JSONObject – a JSON object with a field mbs.remote.backup.failOnError that can have values true or false.
  • location: String – File name of the data that will be used for the restore operation. It is a mandatory field and cannot be null.

    The location parameter for BACKUP/restore command is not allowed to be an arbitrary URL any more – it is interpreted as a backup file name instead.

    To allow the old functionality, where location is not a file name but a URL, the mbs.webservices.jsonrpc.legacy.restoreFromUrl system property should be set to true.

  • provider info: BackupProviderInfo[] – Optional. Backup Providers on which a restore operation should be executed. If this field is missing restore operation is done on all available Backup Providers.

Objects

Object

Field

Field Description

Representation

BackupProviderInfo

  • name: string
  • version: string
  • data-version: string
  • name: string – Contains the symbolic name of the Backup Provider bundle.
  • version: string – Contains version of the Backup Provider bundle.
  • data-version: string – Contains data version of the Backup Provider.

{name:String, version:String, data-version:String}

BackupResult

  • url: string
  • status: MultiBackupStatus
  • url: string – Contains local file path to backup data file. Should be used by the remote service that wants to fetch results for the backup/restore operation. It is assumed that machine on which backup is executed supports an HTTP server so the URL uses the HTTP protocol. On request the same IP and port should be used for a JSON-RPC backup operation. The URL used for getting results for the backup/restore operation is valid for a specified timeout after which the backup file is deleted.
  • status: MultiBackupStatus – Contains the overall result of backup operation.

{url:String, status:JSONObject<MultiBackupStatus>} String[2]: {„#error", <cause>} on failure

MultiBackupStatus

  • status: int
  • list: BackupStatus[]
  • status: int – Contains the overall status.
  • list: BackupStatus[] – Contains the status of all Backup Providers.

{status:int, list:JSONArray<BackupStatus>}

BackupStatus

  • status: int
  • name: string
  • version: string
  • exception: Exception
  • status: int – Contains the Backup Provider status.
  • name: string – Contains the symbolic name of the Backup Provider bundle.
  • version: string – Contains the version of the Backup Provider bundle.
  • exception: Exception – On failure contains the cause (may still be null), otherwise null.

{status:int, name:String, version:String, exception*:String} on success

System Properties

Property

Type

Default Value

Description

mbs.remote.backup.urlTimeout

int

5000

The timeout in milliseconds for making available the URL for executing the backup operation. After the predefined time expires the URL is no longer available.

mbs.remote.backup.localOnly

boolean

false

Indicates whether the backup should be executed locally or the data should be sent via an URL.

mbs.remote.backup.filename

String

backup<yyyy-MM-dd_hh-mm-ss>.zip

Indicates the name of the file that will be used for backing up the data.

mbs.remote.backup.failOnError

boolean

true

The property is used for the restore operation. It defines the behavior of the Backup Admin when one or more of the Backup Providers encounter a problem with the execution of the backup operation. If it is set to "true", the entire backup operation fails and a BackupAdminException is thrown. Set it to "false" to allow the backup process to continue in spite of the failed Backup Providers. In this case the exception(s) are ignored and an ERROR message is logged.