Sync to DS

PUT/zstack/v1/database-backups/{uuid}/actions

Sync backup to backup storage.

Headers

Authorization: OAuth the-session-uuid

Body

{
  "syncDatabaseBackupFromImageStoreBackupStorage": {
    "srcBackupStorageUuid": "72ad4c5419d63f5aaf37faf985c95a65",
    "dstBackupStorageUuid": "76b2c6b412a73ef8a4263e659c104fff"
  },
  "systemTags": [],
  "userTags": []
}

The systemTags and userTags fields in the above example are optional. They are listed to indicate that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"syncDatabaseBackupFromImageStoreBackupStorage":{"srcBackupStorageUuid":"72ad4c5419d63f5aaf37faf985c95a65","dstBackupStorageUuid":"76b2c6b412a73ef8a4263e659c104fff"}}' http://localhost:8080/zstack/v1/database-backups/4594a949f00e3a55932f5b5e66ec9d67/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlThe UUID of the resource. Uniquely identifies the resource 3.0.0
srcBackupStorageUuidStringbody (Contained in the syncDatabaseBackupFromImageStoreBackupStorage structure)  3.0.0
dstBackupStorageUuidStringbody (Contained in the syncDatabaseBackupFromImageStoreBackupStorage structure)  3.0.0
systemTags (Optional)Listbody  3.0.0
userTags (Optional)Listbody  3.0.0

API Response

Response Example

{
  "inventory": {
    "uuid": "c04683f1c53039d1bb0b0f0b601b5a5b",
    "name": "Backup-1",
    "description": "database backup",
    "size": 1048576.0,
    "createDate": "Nov 14, 2017 10:20:57 PM",
    "lastOpDate": "Nov 14, 2017 10:20:57 PM"
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null on success. For details, seeerror3.0.0
inventoryDatabaseBackupInventoryFor details, seeinventory3.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

inventory

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource3.0.0
nameStringResource name3.0.0
descriptionStringDetailed description of the resource3.0.0
stateString 3.0.0
statusString 3.0.0
sizeLong 3.0.0
metadataString 3.0.0
createDateTimestampCreation time3.0.0
lastOpDateTimestampLast modification time3.0.0
backupStorageRefsListFor details, seebackupStorageRefs3.0.0

backupStorageRefs

NameTypeDescriptionStarting Version
databaseBackupUuidString 3.0.0
backupStorageUuidStringImage Storage UUID3.0.0
installPathString 3.0.0
exportUrlString 3.0.0
statusString 3.0.0
createDateTimestampCreation time3.0.0
lastOpDateTimestampLast modification time3.0.0

SDK Examples

Java SDK

SyncDatabaseBackupFromImageStoreBackupStorageAction action = new SyncDatabaseBackupFromImageStoreBackupStorageAction();
action.uuid = "4594a949f00e3a55932f5b5e66ec9d67";
action.srcBackupStorageUuid = "72ad4c5419d63f5aaf37faf985c95a65";
action.dstBackupStorageUuid = "76b2c6b412a73ef8a4263e659c104fff";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SyncDatabaseBackupFromImageStoreBackupStorageAction.Result res = action.call();

Python SDK

SyncDatabaseBackupFromImageStoreBackupStorageAction action = SyncDatabaseBackupFromImageStoreBackupStorageAction()
action.uuid = "4594a949f00e3a55932f5b5e66ec9d67"
action.srcBackupStorageUuid = "72ad4c5419d63f5aaf37faf985c95a65"
action.dstBackupStorageUuid = "76b2c6b412a73ef8a4263e659c104fff"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SyncDatabaseBackupFromImageStoreBackupStorageAction.Result res = action.call()