Score:1

Restore an Azure SQL database while retaining backups

gy flag

I'm trying to figure out how to restore a database using the Azure Portal without losing either point-in-time or long-term retention history.

  1. My production database has both a point-in-time and a long-term retention backup schedule

  2. Restore must be to a new database name (can not be the production database)

  3. Renaming the restored database to the production name causes history to be lost

To keep the backup history, the old production database must be kept around. Am I missing a step somewhere?

Score:0
in flag

Please restore the database on a different logical server with same name as in Production. This way you don't lose backup history of the Production database.

The name of the database is indeed key to retain the point-in-time backups even if you delete/drop the Production database you can use PowerShell to list all available backups as explained here.

Chris Capon avatar
gy flag
If I follow your steps and restore the database to a different logical server, what happens to the backup history on the old logical server if I delete the old database? Is the backup history still kept in Azure and retained forever or is it deleted along with the old database?
Alberto Morillo avatar
in flag
You will keep all backups on the old logical server despite deleting the old database from that server. You can verify that with PowerShell:
Alberto Morillo avatar
in flag
$ResourceGroup = "ResourceGroup01" $ServerName = "Server01" Get-AzureRmSqlDeletedDatabaseBackup -ResourceGroupName $ResourceGroup -ServerName $ServerName
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.