El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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 an Existing DB Instance

Updated on 2022-08-16 GMT+08:00

Function

This API is used to restore a database to an existing DB instance.

Constraints

  • This API does not support PostgreSQL instance restoration.
  • When data is restored to an existing DB instance, the API has the following constraints:
    • The DB engine of the original DB instance must be the same as that of the target DB instance. For example, if the original DB instance is running MySQL, the target DB instance must also run MySQL.
    • The target DB instance version must be later than or equal to that of the source instance. For example, MySQL 5.7.25 DB instance can be restored to MySQL 5.7.27 DB instance. For constraints of Microsoft SQL Server, see Table 1.
    • The total storage space of the target DB instance must be greater than or equal to that of the original DB instance.
    • Cross-region restoration is not supported.
  • When data is restored to an original DB instance:

    This API is supported only for the Microsoft SQL Server DB engine.

    Table 1 Restoring to the DB engine versions supported by RDS for SQL Server

    Original DB Engine Version

    Restore To

    2008 Standard Edition

    2008 Standard Edition

    2012 Web Edition

    2012 Web Edition

    2012 Standard Edition

    2012 Enterprise Edition

    2012 Standard Edition

    2012 Standard Edition

    2012 Enterprise Edition

    2012 Enterprise Edition

    2012 Enterprise Edition

    2014 Standard Edition

    2014 Standard Edition

    2014 Enterprise Edition

    2014 Enterprise Edition

    2014

    2016 Standard Edition

    2016 Standard Edition

    2016 Enterprise Edition

    2016 Enterprise Edition

    2016 Enterprise Edition

    2017 Web Edition

    2017 Web Edition

    2017 Standard Edition

    2017 Enterprise Edition

    2017 Standard Edition

    2017 Standard Edition

    2017 Enterprise Edition

    2017 Enterprise Edition

    2017 Enterprise Edition

URI

  • URI format

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

  • Example

    https://rds.my-kualalumpur-1.alphaedge.tmone.com.my/v3/0483b6b16e954cb88930a360d2c4e663/instances/recovery

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

Request

  • Parameter description
    Table 3 Parameter description

    Name

    Mandatory

    Type

    Description

    source

    Yes

    Object

    Specifies the restoration information.

    For details, see Table 4.

    target

    Yes

    Object

    Specifies the restoration target.

    For details, see Table 5.

    Table 4 source field data structure description

    Name

    Mandatory

    Type

    Description

    instance_id

    Yes

    String

    Specifies the DB instance ID.

    type

    No

    String

    Specifies the restoration mode. Enumerated values include:

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

    backup_id

    No

    String

    Specifies the ID of the backup used to restore data. This parameter must be specified when the backup file is used for restoration.

    restore_time

    No

    Integer

    Specifies the time point of data restoration in the UNIX timestamp. The unit is millisecond and the time zone is UTC.

    database_name

    No

    Map<String, String>

    This parameter applies only to the Microsoft SQL Server DB engine. If this parameter is specified, you can restore specific databases in the DB instance and customize the database names as required.

    • The new database names must be different from the original database names and target database names. If you do not customize the database names, data will be restored to the original databases by default.
      NOTICE:

      If this parameter is not specified, all databases are restored by default.

      Example value: "database_name":{"Original database name":"New database name"}

    • The new database names cannot contain the following fields (case-insensitive): rdsadmin, master, msdb, tempdb, model, and resource.
    • Each database name consists of 1 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.
    Table 5 target field data structure description

    Name

    Mandatory

    Type

    Description

    instance_id

    Yes

    String

    Specifies the ID of the DB instance which the backup will be restored to.

  • Request example

    Use backup files for restoration:

    MySQL:

    {
    	"source": {
    		"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01",
    		"type": "backup",
    		"backup_id": "2f4ddb93-b901-4b08-93d8-1d2e472f30fe"
    	},
    	"target": {
    		"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01"
    	}
    }

    Microsoft SQL Server:

    {
    	"source": {
    		"instance_id": "61879e6085bc44d1831b0ce62d988fd9in04",
    		"type": "backup",
    		"backup_id": "b021670e69ba4538b7b2ed07257306aebr04",
    		"database_name": {
    			"db1": "dbtest1",
    			"db2": ""
    		}
    	},
    	"target": {
    		"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin04"
    	}
    }

    Use PITR for restoration:

    MySQL:

    {
    	"source": {
    		"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01",
    		"type": "timestamp",
    		"restore_time": 1532001446987
    	},
    	"target": {
    		"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01"
    	}
    }

    Microsoft SQL Server:

    {
    	"source": {
    		"instance_id": "61879e6085bc44d1831b0ce62d988fd9in04",
    		"type": "timestamp",
    		"restore_time": 1532001446987,
    		"database_name": {
    			"db1": "dbtest1",
    			"db2": ""
    		}
    	},
    	"target": {
    		"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin04"
    	}
    }

Response

  • Normal response
    Table 6 Parameter description

    Name

    Type

    Description

    job_id

    String

    Indicates the task ID.

  • Example normal response
    {
    	"job_id": "ff80808157127d9301571bf8160c001d"
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback