Skip to main content

POST /managementServer/data

Use this method to backup or restore Lenovo XClarity Administrator system data, settings, and imported files such as operating-system images, firmware updates, and OS device drivers.

During the backup or restore operation, the management server is placed in a quiesced state. You can use the GET /managementServer/quiesce method to retrieve the current status of the management server and of the backup or restore operation that is in progress. Note that while the management server is being quiesced or resumed, status cannot be retrieved.

The restore operation is a multiple-step operation. The backup package must first be decrypted and prepared before the restore can start.

To restore a backup file in a newly setup management server, complete the following steps.

  1. Send the backup to the new management server by completing one of the following steps.

    1. Importing the backup to the management server using POST /files/managementServer/data?action=import.

    2. Pushing the backup from an existing management server to the new management server using PUT /managementServer/data and specifying the operation=push and action=start request attributes.

  2. Validate, decrypt, and prepare the backup using POST /files/managementServer/data?action=process.

  3. Restore the backup using POST /managementServer/data and specifying the operation=restore and action=start request attributes.

To restore a backup file in an existing management server, complete the following steps

  1. If the package is not in the local repository, either:

  1. Decrypt and prepare the backup using POST /managementServer/data and specifying the operation=restore and action=prepare request attributes.

  2. Restore the backup using POST /managementServer/data and specifying the operation=restore and action=start request attributes.

Attention
Review the following considerations before restoring a backup.
  • If you want to restore managed devices, you must also restore the network settings except when the target management server uses the same IP address as the source management server when the backup was created. Restoring managed devices without restoring network settings in a management server with different IP address causes most devices to lose connectivity.

  • If the backup was created in a management server with a static IP address and you restore network settings, ensure that there will be no IP address conflicts in your network. If another system is using the same IP address, you might not be able access both the existing system and the XClarity Administrator instance.

  • If the backup was created in a management server with a DHCP IP address and you restore network settings, ensure that you modify the MAC address for the DHCP server or the XClarity Administrator instance so that the management server can receive the same IP address that the source management server had when the backup package was created.

  • The restore operation checks whether the source IP addresses are available to avoid IP conflicts. If at least one of the source IP addresses is already in use and online, the restore operation fails and returns an error message.

Authentication

Authentication with username and password is required.

Request URL

POST https://{management_server_IP}/managementServer/data

Query parameters

None

Request body

Table 1. Back up data, settings, and imported files
AttributesRequired / OptionalTypeDescription
actionRequiredStringAction to take. This can be the following value.
  • start. Start the backup operation

Note
To cancel a backup operation, use GET /managementServer/quiesce.
includeFWRequiredBooleanIndicates whether to include firmware and OS device-driver updates in the backup. This can be one of the following values.
  • true. Include updates.

  • false. Do not include updates.

includeOSRequiredBooleanIndicates whether to include operating system images in the backup. This can be one of the following values.
  • true. Include OS images.

  • false. Do not include OS images.

labelRequiredStringFile name of the backup. If empty, the file name is the current date
operationRequiredStringType of operation to perform. This can be the following value.
  • backup. Back up data, settings, and imported files

passphraseRequiredStringPassphrase that is required for decrypting and restoring the backup.
Attention
If you forget the passphrase, it cannot be recovered.
remoteShareDestinationOptionalStringRemote share where you want to store the backup (for example, /mnt/backups).

If you do not specify a remote share or if the attribute is empty, the backup is stored in the local repository.

The following example creates a backup named “mybackup,” which includes operating-system images, firmware updates, and OS device drivers, and stores the backup on a specific remote share.
{
"action": "start",
"includeFW": true,
"includeOS": true,
"label": "mybackup",
"operation": "backup",
"passphrase": "123456789",
"remoteShareDestination": "/mnt/my_remote_share"
}
Table 2. Prepare an existing management server for a restore operation
AttributesRequired / OptionalTypeDescription
actionRequiredStringAction to take. This can be the following value.
  • prepare. Decrypt the backup and prepare the management server to restore data, settings, and files

operationRequiredStringOperation to perform. This can be the following value.
  • restore. Restore data, settings, and files to an existing or new virtual appliance.

passphraseRequiredStringPassphrase to use to decrypt the backup
uuidRequiredStringUUID of the backup file to restore
The following example prepares the management server to restore data and files.
{
"action": "prepare",
"operation": "restore",
"passphrase": "123456789",
"uuid": "56be1884-3187-4a4c-90b5-13f05ee824a2"
}
Table 3. Restore data, settings, and imported files from a backup
AttributesRequired / OptionalTypeDescription
actionRequiredStringAction to take. This can be the following value.
  • start. Start the restore operation

devicesRequiredBooleanIndicates whether to restore device inventory. This can be one of the following values.
  • true. Restore device inventory.

  • false. Do not restore device inventory.

firmwareRequiredBooleanIndicates whether to restore firmware and OS device-driver updates. This can be one of the following values.
  • true. Restore updates.

  • false. Do not restore updates.

networkRequiredBooleanIndicates whether to restore network settings. This can be one of the following values.
  • true. Restore device network settings.

  • false. Do not restore device network settings.

operationRequiredStringOperation to perform. This can be the following value.
  • restore. Restore data, settings, and files to an existing or new virtual appliance.

osImagesRequiredBooleanIndicates whether to restore operating-system images. This can be one of the following values.
  • true. Restore operating-system images.

  • false. Do not restore operating-system images.

The following example creates a backup named “mybackup2,” which includes operating-system images but not firmware and OS device-driver updates, and stores the backup in the local repository.
{
"action": "start",
"includeFW": false,
"includeOS": true,
"label": "mybackup2",
"operation": "backup",
"passphrase": "123456789"
}
The following example restores data and network settings but not operating-system images, firmware updates, and OS device drivers.
{
"action": "start",
"devices": true,
"network": true,
"operation": "restore",
"osImages": false,
"firmware": false
}
Table 4. Cancel a restore operation
AttributesRequired / OptionalTypeDescription
actionRequiredStringAction to take. This can be the following value.
  • cancel. Cancel the restore operation that in in progress.

operationRequiredStringOperation to perform. This can be the following value.
  • restore. Restore data, settings, and files to an existing or new virtual appliance.

The following example cancels a restore operation.
{
"action": "cancel",
"operation": "restore"
}

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
400Bad RequestA query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
401UnauthorizedThe user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body.
403ForbiddenThe orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

AttributesTypeDescription
resultStringResults of the request. This can be one of the following values.
  • success. The request completed successfully.
  • failed. The request failed. A descriptive error message was returned.
  • warning. The request completed with a warning. A descriptive error message was returned.
messagesArray of objectsInformation about one or more messages
 idStringMessage identifier of a returned message
 textStringMessage text associated with the message identifier
 explanationStringAdditional information to clarify the reason for the message
 recoveryArray of objectsRecovery information
  textStringUser actions that can be taken to recover from the event
  URLStringLink to the help system for more information, if available
The following example is returned if the request is successful.
{
"result": "success",
"message": []
}