Skip to content

Commit 09aed52

Browse files
committed
Merge branch '20200226_mipitr' of https://github.com/MashaMSFT/azure-docs-pr into 20200226_mipitr
2 parents 2c937d5 + be874d1 commit 09aed52

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

articles/sql-database/sql-database-managed-instance-point-in-time-restore.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@ Use point-in-time restore (PITR) to create a database as a copy of another datab
1818

1919
Point-in-time restore is useful in recovery scenarios, such as incidents caused by errors, incorrectly loaded data, or deletion of crucial data. You can also use it simply for testing or auditing. Backup files are kept for 7 to 35 days, depending on your database settings.
2020

21-
Point-in-time restore can:
21+
Point-in-time restore can restore a database:
2222

23-
- Restore a database from an existing database.
24-
- Restore a database from a deleted database.
23+
- from an existing database.
24+
- from a deleted database.
25+
- to the same managed instance, or to another managed instance.
2526

26-
For a managed instance, point-in-time restore can also:
27-
28-
- Restore a database to the same managed instance.
29-
- Restore a database to another managed instance.
3027

3128
> [!NOTE]
3229
> Point-in-time restore of a whole managed instance is not possible. This article explains only what's possible: point-in-time restore of a database that's hosted on a managed instance.
@@ -86,7 +83,7 @@ Restore-AzSqlInstanceDatabase -FromPointInTimeBackup `
8683
-TargetInstanceDatabaseName $targetDatabase `
8784
```
8885

89-
To restore the database to another managed instance, also specify the names of the target resource group and managed instance:
86+
To restore the database to another managed instance, also specify the names of the target resource group and target managed instance:
9087

9188
```powershell-interactive
9289
$targetResourceGroupName = "<Resource group of target managed instance>"
@@ -141,7 +138,7 @@ To recover a managed database using the Azure portal, open the managed instance
141138

142139
### PowerShell
143140

144-
To restore a database to the same instance, or another instance, update the parameter values and then run the following PowerShell command:
141+
To restore a database to the same instance, update the parameter values and then run the following PowerShell command:
145142

146143
```powershell-interactive
147144
$subscriptionId = "<Subscription ID>"
@@ -158,11 +155,27 @@ $deletedDatabase = Get-AzSqlDeletedInstanceDatabaseBackup -ResourceGroupName $re
158155
159156
Restore-AzSqlinstanceDatabase -Name $deletedDatabase.Name `
160157
-InstanceName $deletedDatabase.ManagedInstanceName `
161-
-ResourceGroupName $deletedDatabase.ResourceGroupName -DeletionDate $deletedDatabase.DeletionDate `
162-
-PointInTime UTCDateTime -TargetInstanceDatabaseName $targetDatabaseName
158+
-ResourceGroupName $deletedDatabase.ResourceGroupName `
159+
-DeletionDate $deletedDatabase.DeletionDate `
160+
-PointInTime UTCDateTime `
161+
-TargetInstanceDatabaseName $targetDatabaseName
163162
```
164163

164+
To restore the database to another managed instance, also specify the names of the target resource group and target managed instance:
165165

166+
```powershell-interactive
167+
$targetResourceGroupName = "<Resource group of target managed instance>"
168+
$targetInstanceName = "<Target managed instance name>"
169+
170+
Restore-AzSqlinstanceDatabase -Name $deletedDatabase.Name `
171+
-InstanceName $deletedDatabase.ManagedInstanceName `
172+
-ResourceGroupName $deletedDatabase.ResourceGroupName `
173+
-DeletionDate $deletedDatabase.DeletionDate `
174+
-PointInTime UTCDateTime `
175+
-TargetInstanceDatabaseName $targetDatabaseName `
176+
-TargetResourceGroupName $targetResourceGroupName `
177+
-TargetInstanceName $targetInstanceName
178+
```
166179

167180
## Overwrite an existing database
168181

0 commit comments

Comments
 (0)