Restoring Databases and Tables to a Point in Time
Description
This API is used to restore databases and tables at a point in time.
Restrictions
This API applies only to replica sets.
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
X-Language |
string |
header |
No |
Language |
|
project_id |
string |
path |
Yes |
Project ID. To obtain the project ID, see Obtaining a Project ID. |
|
instance_id |
string |
path |
Yes |
Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one. |
Request Parameters
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
X-Auth-Token |
string |
header |
Yes |
User token |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
restore_collections |
Array of objects |
Yes |
The database information. For details, see Table 4. |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
database |
String |
Yes |
Database name. |
|
collections |
Array of objects |
No |
The collection information. For details, see Table 5. |
|
restore_database_time |
String |
No |
The database restoration time point. This parameter is mandatory for database-level restoration, The value is a UNIX timestamp, in milliseconds. The time zone is UTC. |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
old_name |
String |
Yes |
The table name before the restoration. |
|
new_name |
String |
No |
The table name after the restoration. |
|
restore_collection_time |
String |
Yes |
The collection restoration time point. The value is a UNIX timestamp, in milliseconds. The time zone is UTC. |
- Request example
- Database-level restoration
{ "restore_collections": [ { "database": "test", "restore_database_time": 1607762955000 } ] } - Collection-level restoration
{ "restore_collections": [ { "database": "test", "collections": [ { "old_name": "test", "restore_collection_time": 1607762955000 } ] } ] }
- Database-level restoration
Response Parameters
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
job_id |
String |
Yes |
ID of the asynchronous task for the restore operation. |
- Example response
{ "job_id": "a03b1b8a-b756-467c-8a49-38720c3d23ec" }
Status Code
For details, see Status Code.
Error Code
For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot