November 2017
Intermediate to advanced
276 pages
7h 6m
English
First off, we have to create two variables, one for the database properties, and the other for the date to which we want to restore the database to:
$Database = Get-AzureRmSqlDatabase -ResourceGroupName PacktPub -ServerName packtpubsqlps -DatabaseName PacktPubDBPS$ Date = Get-Date – Date “The date you want to restore to”$Date = $Date.ToUniversalTime()
Then, you can start the restoration process by triggering the following cmdlet:
Restore-AzureRmSqlDatabase -FromPointInTimeBackup -PointInTime $Date -ResourceGroupName PacktPub -ServerName packtpubsqlps -TargetDatabaseName "PacktPubRestoredDB" -ServiceObjectiveName "S3" -ResourceId $Database.ResourceId