Sample Header Ad - 728x90

Powershell Restore Azure SQL Database to local with Restore-Database

2 votes
1 answer
2811 views
I have written a powershell script that uses Start-AzureSqlDatabaseExport & Get-AzureStorageBlob to export my Azure DB to a bacpac and download it locally, the next step is to restore the bacpac to my local SQL DB using Restore-Database, but below fails with "the media family on device is incorrectly formatted". Restore-Database -dbName "MyDB" -backupFile "C:\MyAzureBackup.bacpac" Is there a way to get this working with Restore-Database, or is there an alternative command that will do this?
Asked by BikerP (121 rep)
Dec 22, 2014, 10:02 AM
Last activity: May 1, 2025, 09:08 AM