mgwutil get-report 命令用於查詢遷移報告詳情。
命令格式
mgwutil get-report <job-name> --runtime-id <value>參數說明
參數 | 必填 | 說明 |
job-name | 是 | 待查詢遷移報告的任務名稱。 |
--runtime-id | 是 | 待查詢遷移報告的執行 ID。 |
使用樣本
說明
在報告產生完成前,FailedListPrefix、SkippedListPrefix 和 TotalListPrefix 均為空白。
一旦 Status 顯示為 Finished,即表示報告已產生,您可以查看完整內容。
mgwutil get-report report-job --runtime-id 1返回結果
成功返回
{
"Code": "success",
"StatusCode": 200,
"LogTime": "2026-01-16 13:38:32",
"Data": {
"CopiedCount": 99,
"ErrorMessage": "",
"FailedCount": 0,
"FailedListPrefix": "aliyun_import_report/***/949c2ea3-cb16-49d8-a9a8-****/1/failed_list/",
"JobCreateTime": "1728964941",
"JobEndTime": "1728972612",
"JobExecuteTime": "190",
"ReportCreateTime": "1728975577",
"ReportEndTime": "1728975577",
"SkippedCount": 0,
"SkippedListPrefix": "aliyun_import_report/***/949c2ea3-cb16-49d8-a9a8-****/1/skipped_list/",
"Status": "Finished",
"TotalCount": 99,
"TotalListPrefix": "aliyun_import_report/***/949c2ea3-cb16-49d8-a9a8-****/1/total_list/"
}
}失敗返回
{
"Code": "fail",
"StatusCode": 404,
"LogTime": "2026-01-16 13:38:32",
"ErrorMsg": "SDKError: StatusCode: 404 Code: NoSuchImportJob Message: The specified import job does not exist Data: {'AccessDeniedDetail':null,'Recommend':null,'ecCode':null,'hostId':'1****963****4***5.cn-hangzhou.mgw.aliyuncs.com','requestId':'6969CED89367063631217C50','statusCode':404} ",
"ErrorCode": "NoSuchImportJob",
"RequestId": "6969CED89367063631217C50"
}錯誤碼
說明
錯誤碼錶示錯誤類別,詳情請參考錯誤資訊(ErrorMsg)。
此錯誤碼包含 通用錯誤碼。
ErrorCode | 說明 |
NoSuchImportJob | 指定的任務不存在,請確認任務名稱輸入無誤且該任務已完成建立。 |