Table of Contents

Convert .bacpac to .bak

If you have a .bacpac file, e.g. from an Azure SQL database and want to convert it to a .bak file, you can use this functionality. It will start a SQL Server container, restore the .bacpac file to a database and then create a .bak file from it. Currently the only supported way to get a .bacpac file into the service is to store it on the Azure Fileshare.

To convert a .bacpac file, take these steps:

  1. Upload the file to the Azure Fileshare directly in the root folder or in a subfolder (e.g. in a subfolder "backups" and the name of the file is "database-backup.bacpac")
  2. Go to an organization, project and repository of your choosing. The conversion is not actually connected to the repository, but the container will appear below that repository.
  3. Do a right-click on the Containers item and select Convert database backup
  4. Enter the display name for the conversion container, e.g. "Backup Conversion"
  5. Enter the path to your .bacpac file on the Azure Fileshare (e.g. /fileshare/backups/database-backup.bacpac or C:\azurefileshare\backups\database-backup.bacpac)
  6. Optionally enter a company name if you want to remove all companies except that one during the conversion
  7. When the container was created, you can do a right-click on it and select Open log
  8. You can ignore the first couple of lines until you see "SQL Server ready"
  9. Wait until you can see in the log that the SQL server is stopped again. Note that the conversion will take a couple of minutes even for smaller databases and can take hours for medium or large databases
  10. You will find a file with the same filename, but extension .bak in the same folder as the original .bacpac file
  11. Delete the conversion container

Convert database backup