Get Database Backup

GET/zstack/v1/database-backups/image-store

Get exported database backup from backup storage.

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/database-backups/image-store?url=ssh://root:password@localhost:22/Cloud_bs&registryPort=8000.0

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
urlStringqueryImage Storage URL 3.0.0
registryPort (Optional)intqueryImage repository access port 3.0.0
systemTags (Optional)Listquery  3.0.0
userTags (Optional)Listquery  3.0.0

API Response

Response Example

{
  "infos": [
    {
      "id": "270c67e3699f72ba",
      "created": "Nov 14, 2017 10:20:57 PM",
      "author": "cloud",
      "arch": "amd64",
      "size": 7995392.0,
      "virtualsize": 12682240.0,
      "name": "78b6afbc9da73932a000fb9a75947962"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null on success. For details, see error3.0.0
infosListFor details, see infos3.0.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10013.0.0
descriptionStringA brief description of the error3.0.0
detailsStringThe detailed error information3.0.0
elaborationStringReserved field. Default is null3.0.0
opaqueLinkedHashMapReserved field. Default is null3.0.0
causeErrorCodeThe root error. The source error that caused the current error. This field is null if there is no root error3.0.0

infos

NameTypeDescriptionStarting Version
idStringID in the image repository3.0.0
parentStringParent image name3.0.0
blobsumStringImage hash3.0.0
createdTimestampImage commit time3.0.0
authorStringImage author3.0.0
archStringOS architecture of the image3.0.0
descStringImage description3.0.0
sizeLongActual size of the image3.0.0
virtualsizeLongVirtual size of the image3.0.0
nameStringImage name in the image repository3.0.0

SDK Examples

Java SDK

GetDatabaseBackupFromImageStoreAction action = new GetDatabaseBackupFromImageStoreAction();
action.url = "ssh://root:password@localhost:22/Cloud_bs";
action.registryPort = 8000.0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetDatabaseBackupFromImageStoreAction.Result res = action.call();

Python SDK

GetDatabaseBackupFromImageStoreAction action = GetDatabaseBackupFromImageStoreAction()
action.url = "ssh://root:password@localhost:22/Cloud_bs"
action.registryPort = 8000.0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetDatabaseBackupFromImageStoreAction.Result res = action.call()