Restoring Backup Files to a Self-built SQL Server Database Using SQL Statements
You can download backup files by referring to Downloading a Backup File and restore data from them. You can use SQL Server Management Studio (SSMS) to restore data to a self-built database on an ECS or an on-premises database. This section describes how to use SQL statements to restore data from backup files to an on-premises database.
![](https://support.huaweicloud.com/intl/en-us/usermanual-rds/public_sys-resources/note_3.0-en-us.png)
- Before restoring data, ensure that the ECS has been installed with an SQL Server database of the same version as or later than your RDS for SQL Server instance.
- You can download an unsynchronized backup as required and use the unsynchronized backup and the most recent backup to restore data. To obtain the most recent backup, contact customer service.
Procedure
- Download the required backup file to a local directory by referring to Downloading a Backup File.
- Check logical information about the backup file and ensure that the information in the query result is correct.
RESTORE FILELISTONLY FROM DISK = 'Local directory for the backup file';
- Restore data to your on-premises database.
RESTORE DATABASE [xxx] FROM DISK = 'Local directory for the backup file';
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