SQL managed instance PITR latest backup time

RM 20 Reputation points
2023-06-06T12:43:51.8533333+00:00

Hello.

I have installed SQLMI1 and SQLMI2 and i try to simulate if SQLMI1 goes down and i try to restore database/s from LATEST PITR backup time to SQLMI2.

Once i take down (stop) SQLMI1 from portal it obviously dont take any PITR backups anymore.
I create new SQLMI2 in same region and subcsription and via portal i am trying to restore database from SQLMI1.
I get error:
User's image

If i try to do restore from Powershell

$RestorePITRtime=Get-Date #get current time
$RestorePITRtime=$RestorePITRtime.ToUniversalTime() #convert to UTC

Restore-AzSqlInstanceDatabase -FromPointInTimeBackup -ResourceGroupName $srcResourceGroupName  -InstanceName  $srcInstanceName -Name $Database -PointInTime $RestorePITRtime -TargetInstanceDatabaseName $Database"_restored" -TargetResourceGroupName $dstResourceGroupName -TargetInstanceName $dstInstanceName
i get same errorUser's image

It looks like i have to specify time of restore right before SQLMI1 went down, BUT HOW i could know the time of last backup on SQLMI1.

  1. I can try to figure out time when SQLMI1 went down, but is this good approach?
  2. Does anyone know how to retrieve latest PITR backup time/point?
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
40,177 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.