POST zstack/v1/volumes/{rootVolumeUuid}/vm-backups
Authorization: OAuth the-session-uuid
{ "params": { "backupStorageUuid": "fc50c1ece4753c1981e3e3f65a151e0e", "name": "backup-1", "description": "a critical volume backup" }, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X POST -d '{"params":{"backupStorageUuid":"fc50c1ece4753c1981e3e3f65a151e0e","name":"backup-1","description":"a critical volume backup"}}' http://localhost:8080/zstack/v1/volumes/aa6fad9b71af3785a9fdec200bab3ee8/vm-backups
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
rootVolumeUuid | String | url | 根硬盘UUID | 3.0.0 | |
backupStorageUuid | String | body(包含在params结构中) | 镜像存储UUID | 3.0.0 | |
name | String | body(包含在params结构中) | 资源名称 | 3.0.0 | |
description (可选) | String | body(包含在params结构中) | 资源的详细描述 | 3.0.0 | |
resourceUuid (可选) | String | body(包含在params结构中) | 3.0.0 | ||
volumeReadBandwidth (可选) | Long | body(包含在params结构中) | 硬盘读取带宽 | 3.1.0 | |
volumeWriteBandwidth (可选) | Long | body(包含在params结构中) | 硬盘写入带宽 | 3.1.0 | |
networkReadBandwidth (可选) | Long | body(包含在params结构中) | 网络下行带宽 | 3.1.0 | |
networkWriteBandwidth (可选) | Long | body(包含在params结构中) | 网络上行带宽 | 3.1.0 | |
systemTags (可选) | List | body | 3.0.0 | ||
userTags (可选) | List | body | 3.0.0 |
backup::network::cidr::CIDR
backup::network::cidr::10.0.0.0/8
fsInfo::type::$TYPE::url::$URL::options::$OPTIONS
fsInfo::type::nfs::url::172.32.1.119:/nas/nfs2::options::nolock,vers=3,rsize=32768,wsize=32768
volumeLiveBackup::parallelismDegree::$NUMBER
volumeLiveBackup::parallelismDegree::1
{ "inventories": [ { "uuid": "785edb93bb1b3a31857dac1e69cc8392", "volumeUuid": "2ae6b881bb1239cd907d48993e86a2e8", "name": "Root-Volume-Backup-1", "description": "volume backup", "size": 1.073741824E9, "groupUuid": "2f7c0a5bb86430e8a5ac48312172d70d", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" }, { "uuid": "3084eea905f4311b9d484bfe97142bdf", "volumeUuid": "f6c7d5276c873eba8accddd4a09a1ee6", "name": "Data-Volume-Backup-1", "description": "volume backup", "size": 2.147483648E9, "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } ] }
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 3.0.0 |
inventories | List | 详情参考inventories | 3.0.0 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 3.0.0 |
description | String | 错误的概要描述 | 3.0.0 |
details | String | 错误的详细信息 | 3.0.0 |
elaboration | String | 保留字段,默认为null | 3.0.0 |
opaque | LinkedHashMap | 保留字段,默认为null | 3.0.0 |
cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 3.0.0 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 硬盘备份的UUID,唯一标示该资源 | 3.0.0 |
volumeUuid | String | 硬盘UUID | 3.0.0 |
name | String | 备份名称 | 3.0.0 |
description | String | 备份的详细描述 | 3.0.0 |
type | String | 硬盘的类型 | 3.0.0 |
state | String | 硬盘备份的启用状态 | 3.0.0 |
status | String | 硬盘备份的状态 | 3.0.0 |
size | Long | 当前硬盘备份的大小 | 3.0.0 |
metadata | String | 硬盘备份相关元数据 | 3.0.0 |
createDate | Timestamp | 创建时间 | 3.0.0 |
lastOpDate | Timestamp | 最后一次修改时间 | 3.0.0 |
backupStorageRefs | List | 详情参考backupStorageRefs | 3.0.0 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
volumeBackupUuid | String | 硬盘备份的uuid | 3.0.0 |
backupStorageUuid | String | 镜像存储UUID | 3.0.0 |
installPath | String | 硬盘备份的数据路径 | 3.0.0 |
status | String | 硬盘备份在镜像存储的状态 | 3.0.0 |
createDate | Timestamp | 创建时间 | 3.0.0 |
lastOpDate | Timestamp | 最后一次修改时间 | 3.0.0 |
CreateVmBackupAction action = new CreateVmBackupAction(); action.rootVolumeUuid = "aa6fad9b71af3785a9fdec200bab3ee8"; action.backupStorageUuid = "fc50c1ece4753c1981e3e3f65a151e0e"; action.name = "backup-1"; action.description = "a critical volume backup"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; CreateVmBackupAction.Result res = action.call();
CreateVmBackupAction action = CreateVmBackupAction() action.rootVolumeUuid = "aa6fad9b71af3785a9fdec200bab3ee8" action.backupStorageUuid = "fc50c1ece4753c1981e3e3f65a151e0e" action.name = "backup-1" action.description = "a critical volume backup" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" CreateVmBackupAction.Result res = action.call()
DELETE zstack/v1/vm-backups/{groupUuid}?backupStorageUuids={backupStorageUuids}&deleteMode={deleteMode}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X DELETE http://localhost:8080/zstack/v1/vm-backups/92046c016d7c3af7bdd4a5077fb91450?backupStorageUuids=255fc896605f3237a22940fa92d8670b&deleteMode=Permissive
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
groupUuid | String | url | 备份组uuid | 3.0.0 | |
backupStorageUuids (可选) | List | url | 镜像存储uuid列表 | 3.0.0 | |
deleteMode (可选) | String | url | 3.0.0 | ||
systemTags (可选) | List | body | 3.0.0 | ||
userTags (可选) | List | body | 3.0.0 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
DeleteVmBackupAction action = new DeleteVmBackupAction(); action.groupUuid = "92046c016d7c3af7bdd4a5077fb91450"; action.backupStorageUuids = asList("255fc896605f3237a22940fa92d8670b"); action.deleteMode = "Permissive"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; DeleteVmBackupAction.Result res = action.call();
DeleteVmBackupAction action = DeleteVmBackupAction() action.groupUuid = "92046c016d7c3af7bdd4a5077fb91450" action.backupStorageUuids = [255fc896605f3237a22940fa92d8670b] action.deleteMode = "Permissive" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" DeleteVmBackupAction.Result res = action.call()
PUT zstack/v1/vm-backups/imageStore/{imageStoreUuid}/actions
Authorization: OAuth the-session-uuid
{ "syncVmBackup": {}, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X PUT -d '{"syncVmBackup":{}}' http://localhost:8080/zstack/v1/vm-backups/imageStore/087b41055fbc4875aef622142cbe5ac3/actions
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
imageStoreUuid | String | url | 备份服务器UUID | 3.5.0 | |
systemTags (可选) | List | body | 3.5.0 | ||
userTags (可选) | List | body | 3.5.0 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
SyncVmBackupAction action = new SyncVmBackupAction(); action.imageStoreUuid = "7c3e52e35de449c9abc1343c83b93cd5"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; SyncVmBackupAction.Result res = action.call();
SyncVmBackupAction action = SyncVmBackupAction() action.imageStoreUuid = "07270eb0ae25428586b224c33e88e485" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" SyncVmBackupAction.Result res = action.call()
学习路径
ZStack Cloud 产品学习路径
快速梳理文档,点击相应文本链接,快速跳转到相应文档的页面,学习 ZStack Cloud 产品。
业务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2其他(漏洞提交、投诉举报等)
400-962-2212 转 3业务咨询:
400-962-2212 转 1ZStack学院:
training@zstack.io业务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2其他(漏洞提交、投诉举报等)
400-962-2212 转 3业务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2其他(漏洞提交、投诉举报等)
400-962-2212 转 3业务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io业务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io下载链接已发送至您的邮箱。
如未收到,请查看您的垃圾邮件、订阅邮件、广告邮件。 当您收到电子邮件后,请点击 URL 链接,以完成下载。感谢您使用 ZStack 产品和服务。
成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。
信息提交成功。
我们将安排工作人员尽快与您取得联系,请保持电话畅通。感谢您使用 ZStack 产品和服务。
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。