Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Restoring Data to the Original DB Instance

Updated on 2024-04-02 GMT+08:00

Description

  • This API is used to restore data to the original DB instance.
  • If a cluster DB instance have read replicas associated, backup data can only be restored to a new DB instance.

URI

  • URI format

    POST https://{Endpoint}/v3/{project_id}/instances/recovery

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/056538411200d4cd2f79c003c7606412/instances/recovery

Table 1 Request parameters

Name

Type

IN

Mandatory

Description

X-Auth-Token

string

header

Yes

User token obtained from IAM. For details, see Authentication.

X-Language

string

header

No

Language

project_id

string

path

Yes

Project ID. To obtain the project ID, see Obtaining a Project ID.

Requests

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Mandatory

    Description

    source

    Object

    Yes

    The instance from which the backup was created

    For details, see Table 3.

    target

    Object

    Yes

    The instance to which the backup is restored.

    For details, see Table 4.

    Table 3 source field data structure description

    Name

    Type

    Mandatory

    Description

    instance_id

    String

    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.

    type

    String

    No

    The restoration mode. Enumerated values:

    • backup: indicates using backup files for restoration. In this mode, type is optional and backup_id is mandatory.
    • timestamp: indicates the point-in-time restoration mode. In this mode, type is mandatory and restore_time is mandatory.

    backup_id

    String

    No

    The ID of the backup to be restored. This parameter must be specified when the backup file is used for restoration.

    restore_time

    String

    No

    The point in time that data is restored in the UNIX timestamp. The unit is millisecond and the time zone is UTC.

    NOTE:

    This parameter takes effect only for replica set instances.

    Table 4 target field data structure description

    Name

    Type

    Mandatory

    Description

    instance_id

    String

    Yes

    Specifies ID of the DB instance to be restored from a backup. You can call the API for querying DB Instances to obtain the DB instance ID. If you do not have an instance, you can call the API used for creating an instance.

Example Request

  • Using a backup to restore data to the original DB instance whose ID is d8e6ca5a624745bcb546a227aa3ae1cfin02
    {
      "source": {
        "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02",
        "type": "backup",
        "backup_id": "2f4ddb93-b901-4b08-93d8-1d2e472f30fe"
      },
      "target": {
        "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02"
      }
    }
  • Restoring data to a point in time (applicable to replica set instances and cluster instances 4.0) (The original DB instance ID is d8e6ca5a624745bcb546a227aa3ae1cfin02.)
    {
      "source": {
        "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02",
        "type": "timestamp",
        "restore_time": 1532001446987
      },
      "target": {
        "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02"
      }
    }

Responses

  • Parameter description
    Table 5 Parameter description

    Name

    Type

    Mandatory

    Description

    job_id

    String

    Yes

    ID of the asynchronous task for the restore operation.

  • Response example
    {
        "job_id": "a03b1b8a-b756-467c-8a49-38720c3d23ec"
    }

SDK

Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback