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
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 Databases or Tables to a Point in Time

Updated on 2025-02-13 GMT+08:00

Scenarios

RDS allows you to restore databases or tables using point-in-time recovery (PITR). This ensures your data integrity and minimizes impact on the original instance performance. You can select databases or tables and restore them to a specified point in time. During database or table PITR, RDS downloads the most recent full backup from OBS and restores it to a temporary DB instance, and then replays binlogs to the specified point in time on the temporary instance. After that, data on the temporary instance is written to the target databases or tables of the original instance at an average speed of 35 MB/s.

The time required depends on the amount of data to be restored on the DB instance. Restoring databases or tables will not overwrite data in the DB instance. You can select the databases or tables to be restored.

RDS for MySQL allows you to restore databases or tables of one instance or multiple instances at a time.

Constraints

  • Take care when restoring tables. Improper operations can cause instance or service exceptions.
  • During a standard or fast table restoration, the foreign keys of tables containing foreign keys will be deleted and the table structures will be changed.
  • During table PITR, a maximum of 2,000 tables can be restored for one instance at a time.
  • During database PITR, a maximum of 1,000 databases and 20,000 tables can be restored for a single instance at a time.
  • If you want to restore databases or tables of multiple instances at a time, the instances must be of the same engine version and in the Available state.
  • You can select a maximum of 20 instances at a time for PITR.
  • During the PITR, DB instances and read replicas cannot be rebooted or deleted, and their instance specifications cannot be modified.
  • During the PITR, the database or table information to be restored is read from the latest full backup before the selected time point. You can select any time point within the restoration time range. Therefore, a database or table can be restored to the earliest full backup time point when its information exists.
  • If a table you selected does not exist at the specified point in time, the table will not be restored.
  • Table-level PITR does not support view restoration. To restore a view, restore the tables involved in the view and create the view again.
  • Database-level PITR restores only table data in the databases. The new databases generated after restoration do not contain views.
  • If a DB instance has more than 20,000 tables, RDS does not collect the database and table metadata at a historical time point for performance purposes. Instead, RDS searches for the database and table information from the current instance for restoration. If the target database and table are not displayed but they do exist at the specified time point, you can create an empty database and table with the same names and restore them.
  • During database-level PITR, the table names in the original database cannot contain periods (.). Otherwise, the restoration task may fail.

Prerequisites

After the restoration, a new database or table will be generated in the DB instance. Ensure that the DB instance has sufficient storage space for the generated database or table.

Restoring Databases or Tables of One Instance

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Backups & Restorations. On the displayed page, click Restore Databases or Tables.
  6. Specify restoration information and click Next: Confirm.

    • To facilitate your operations, you can search for the databases or tables to be restored.
    • After the restoration is complete, new databases or tables with timestamps appended as suffixes to original database or table names are generated in the DB instance. You can rename the new databases or tables.
    • The new table name must be unique and consist of 1 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and dollar signs ($) are allowed.
    • Databases whose names contain periods (.) cannot be restored.
    • Database-level PITR and table-level PITR are not supported for databases and tables that contain JSON virtual columns.
    • Cold tables cannot be restored when you restore databases or tables using PITR.
    • During database PITR, if you create new databases with the same names as the restored databases, the data in the new databases may be overwritten, causing data loss.
    • During table PITR, if you create new tables with the same names as the restored tables, the data in the new tables may be overwritten, causing data loss.
    • If the DB instance and the selected time point support fast restoration, you can select Fast for Restoration Mode.
    • If your DB instance has XA transactions, select Standard for Restoration Mode because fast restoration can cause data loss.
    • During a fast restoration, if the target table is renamed in the replayed binlog, the target table may fail to be restored.
    Figure 1 Restoring databases or tables to a point in time

  7. On the displayed page, confirm the information and click Submit.
  8. On the Instances page, check that the DB instance status is Restoring. During the restoration, services are not interrupted.

    You can also view the progress and result of restoring databases or tables to a specified point in time on the Task Center page.

    After the restoration is successful, you can manage data in the databases or tables as required.

NOTE:
  • Data is restored at an average speed of 35 MB/s.
  • Restoring databases or tables to a specified point in time does not affect new data. The restored database or table is a temporary database or table with a timestamp suffix. You can manage the data in the temporary database or table as required.

Restoring Databases or Tables of Multiple Instances in Batches

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, select multiple instances and choose More > Restore Databases or Tables above the instance list.
  5. Specify restoration information and click Next: Confirm.

    • To facilitate your operations, you can search for the instances, databases, or tables to be restored by name.
    • After the restoration is complete, new databases or tables with timestamps appended as suffixes to original database or table names are generated in the DB instance. You can rename the new databases or tables.
    • The new table name must be unique and consist of 1 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and dollar signs ($) are allowed.
    • Databases whose names contain periods (.) cannot be restored.
    • Cold tables cannot be restored when you restore databases or tables using PITR.
    • During database PITR, if you create new databases with the same names as the restored databases, the data in the new databases may be overwritten, causing data loss.
    • During table PITR, if you create new tables with the same names as the restored tables, the data in the new tables may be overwritten, causing data loss.
    • During database PITR, a maximum of 2,000 databases and 20,000 tables can be restored for one instance at a time.
    Figure 2 Restoring databases or tables of multiple instances in batches

  6. On the displayed page, confirm the information and click Submit.
  7. On the Instances page, check that the instances are Restoring. During the restoration process, services are not interrupted.

    You can also view the progress and result of restoring databases or tables to a specified point in time on the Task Center page.

    After the restoration is successful, you can manage data in the databases or tables as required.

NOTE:
  • Data is restored at an average speed of 35 MB/s.
  • Restoring databases or tables to a specified point in time does not affect new data. The restored database or table is a temporary database or table with a timestamp suffix. You can manage the data in the temporary database or table as required.

Follow-up Operations

After the restoration is successful, you can log in to the DB instance for verification.

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