全部產品
Search
文件中心

:RestoreTable - 恢複PolarDB執行個體的某些資料庫或表到原執行個體

更新時間:Dec 11, 2025

恢複PolarDB庫表。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

polardb:RestoreTable

update

*dbcluster

acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}

請求參數

名稱

類型

必填

描述

樣本值

DBClusterId

string

叢集 ID。

說明

您可以通過 DescribeDBClusters 介面查詢帳號下所有叢集的資訊詳情。

pc-bp***************

TableMeta

string

需要還原的目標庫表資訊的 JSON 串,庫表資訊的值都是字串類型。 例如,[ { "tables":[ { "name":"testtb", "type":"table", "newname":"testtb_restore" } ], "name":"testdb", "type":"db", "newname":"testdb_restore" } ]

說明

您可以通過 DescribeMetaList 介面查看支援恢複的庫表名稱詳情,並將支援恢複的庫表資訊填入上述例子中的對應位置。

[ { "tables":[ { "name":"testtb", "type":"table", "newname":"testtb_restore" } ], "name":"testdb", "type":"db", "newname":"testdb_restore" } ]

BackupId

string

備份組 ID。

說明

若需要按備份組還原目標庫表,該參數必傳。您可以通過 DescribeBackups 介面查看備份組 ID。

111111

RestoreTime

string

還原時間點,格式為 YYYY-MM-DDThh:mmZ(UTC 時間)。

說明
  • 若需要按還原時間點,該參數必填。

  • 僅支援恢複到 7 天內的任意時間點。

2020-10-04T01:40:00Z

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

0C47508C-9DC8-455B-985E-2F2FA8******

樣本

正常返回樣本

JSON格式

{
  "RequestId": "0C47508C-9DC8-455B-985E-2F2FA8******"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidRestoreType.Format Specified restore type is not valid. 操作失敗,指定的還原類型無效。
400 InvalidRestoreTime.Format Specified restore time is not valid. 操作失敗,指定的恢復無效。
400 InvalidBackupSetID.NotFound Specified backup set ID does not exist.
400 IncorrectBackupSetState Current backup set state does not support operations.
400 InvalidDBName.Duplicate Specified DB name already exists in the This instance. 操作失敗,此執行個體中已存在指定的資料庫名稱。
400 InvalidParameters.Format Specified parameters is not valid. 指定的參數無效。
400 InsufficientResourceCapacity There is insufficient capacity available for the requested instance. 操作失敗,請求的執行個體沒有足夠的可用容量。
400 InvalidRestoreType.NotFound At least one of BackupId and RestoreTime is malformed. BackupId和RestoreTime中至少有一個格式不正
400 MissingUserID The request is missing a user_id parameter. 請求缺少user_id參數
400 MissingUID The request is missing a uid parameter. 請求缺少uid參數
403 OperationDenied.ArchiveRestore Archive instance does not support restore table. 歷史庫不支援庫表恢複
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. 當前的記錄中不存在提供的DBClusterId。
404 InvalidBackup.NotFound The available backup does not exist in recovery time. 操作失敗,可用備份在恢復內不存在。
404 InvalidDBClusterId.NotFound The DBInstanceId provided does not exist in our records. 當前的記錄中不存在提供的DBClusterId。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情