title | description | author | ms.author | ms.reviewer | ms.date | ms.topic | ms.custom |
---|---|---|---|---|---|---|---|
Restore to a point-in-time |
Describes how to configure automated backups and restore to a point in time |
AbdullahMSFT |
amamun |
mikeray, randolphwest |
10/25/2023 |
how-to |
ignite-2023 |
[!INCLUDE sqlserver]
This article demonstrates how to restore a database to a point-in-time as a new database on the same instance of SQL Server enabled by Azure Arc.
The new database is restored from backup to a point-in-time in the past that is within the retention period.
[!INCLUDE azure-arc-sql-preview]
Before you can restore a database to a point-in-time with the instructions in this article, you have to enable automatic backups. For instructions, see [Manage automated backups - [!INCLUDE ssazurearc]](backup-local.md).
Automated backups are disabled by default.
To restore to a point-in-time from Azure portal:
-
Browse to the Arc-enabled [!INCLUDE ssnoversion-md]
-
Select Backups
-
Among the list of databases on the right pane, select Restore for the database you want to restore.
Azure portal guides you through the instructions to create a database with the selected database as the source database.
-
Provide details such as the point-in-time to restore to, and the name for the new database.
-
Proceed through the wizard to submit the restore deployment
To restore to a point-in-time with az
CLI, update the following example for your environment and run it through your CLI:
az sql db-arc restore --dest-name <name for new database> --resource-group <resource-group> --name <name of source database> --server <Name of Arc-enabled SQL Server> --time <point-in-time to restore to>
Example:
az sql db-arc restore --dest-name "new_db" --resource-group "my-rg" --name "mysourcedb" --server "ArcSQL1" --time "2020-08-16T12:12:12Z"
- The process described in this article requires the backup be taken by an automated backup from an instance of [!INCLUDE ssazurearc]. For instructions, see [Manage automated backups - [!INCLUDE ssazurearc]](backup-local.md).