| title | Back up and restore a database |
|---|---|
| description | Follow this tutorial to learn how to back up and restore databases by using Azure Data Studio. |
| author | markingmyname |
| ms.author | maghan |
| ms.reviewer | alayu |
| ms.date | 11/04/2019 |
| ms.prod | azure-data-studio |
| ms.topic | tutorial |
| ms.custom | seodec18 |
In this tutorial, you learn how to use Azure Data Studio to:
[!div class="checklist"]
- Back up a database.
- View the backup status.
- Generate the script used to perform the backup.
- Restore a database.
- View the status of the restore task.
This tutorial requires SQL Server TutorialDB. To create the TutorialDB database, complete the following quickstart:
This tutorial requires a connection to a SQL Server database. Azure SQL Database has automated backups, so Azure Data Studio doesn't perform Azure SQL Database backup and restore. For more information, see Learn about automatic SQL Database backups.
-
Open the TutorialDB database dashboard by opening the SERVERS sidebar. Then select Ctrl+G, expand Databases, right-click TutorialDB, and select Manage.
-
Open the Backup database dialog box by selecting Backup on the Tasks widget.
-
This tutorial uses the default backup options, so select Backup.
After you select Backup, the Backup database dialog box disappears and the backup process begins.
-
The Task History pane appears, or select Ctrl+T to open it.
-
To view the backup script in the editor, right-click Backup Database succeeded and select Script.
-
Open the SERVERS sidebar by selecting Ctrl+G. Then right-click your server, and select Manage.
-
Open the Restore database dialog box by selecting Restore on the Tasks widget.
-
Select Backup file in the Restore from box.
-
Select the ellipses (...) in the Backup file path box, and select the latest backup file for TutorialDB.
-
Enter TutorialDB_Restored in the Target database box in the Destination section to restore the backup file to a new database. Then select Restore.
-
To view the status of the restore operation, select Ctrl+T to open the Task History.






