Sync Database Backup

PUT/zstack/v1/database-backups/imageStore/{imageStoreUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "syncDatabaseBackup": {},
  "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" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"syncDatabaseBackup":{}}' http://localhost:8080/zstack/v1/database-backups/imageStore/77e7125f5ecf4cbe9129b0e8483a00ae/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
imageStoreUuidStringurlBackup storage UUID 3.2.0
systemTags (Optional)Listbody  3.2.0
userTags (Optional)Listbody  3.2.0

API Response

Response Example

{
  "result": {
    "deletedBackupCount": 1.0,
    "newBackupCount": 3.0
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null on success. For details, see error0.6
resultSyncBackupResultFor details, see result3.8.0

error

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

result

NameTypeDescriptionStarting Version
deletedBackupCountintNumber of deleted backups3.7.0
newBackupCountintNumber of new backups3.7.0

SDK Examples

Java SDK

SyncDatabaseBackupAction action = new SyncDatabaseBackupAction();
action.imageStoreUuid = "e0803f92a12b42688d20f68beef19588";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SyncDatabaseBackupAction.Result res = action.call();

Python SDK

SyncDatabaseBackupAction action = SyncDatabaseBackupAction()
action.imageStoreUuid = "0de54b0b3067493f9461fc74906dfc54"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SyncDatabaseBackupAction.Result res = action.call()