Search code examples
azurebackupazure-sql-databasedatabase-restorebackup-strategies

replace azure database with backup


I have a backup file (.bacpac) of an azure database. I'd like to replace the existing azure database with that backup. What is the recommended procedure:

  • importing the backup into a new database and rename the database to the old one?
  • using SSMS T-SQL: "Restore database [db] from [url] with credential=[..]" ?

How can I ensure that the user is not/minimal affected by the restoring procedure? Can I set the database to be replaced in any kind of offline mode?


Solution

  • Upload your BACPAC file to a container in Blob Storage

    Delete the existing database through the management portal @ http://manage.windowsazure.com

    Click the "+ New" in the bottom left corner of the management portal. Data Services > SQL Database > Import

    In the modal popup that appears, choose your storage account, container, BACPAC file. Type in the name of the Database that you've just deleted so it gets the same name. Choose DB Size, Subscription, Server Username, Password etc... and the wizard will import the BACPAC.