14

I want to move my azure sql db to another host. However my new host allows to import sql db backup-files (.BAK) only; I found out how to generate .BACPAK files with SQL Server Management Studio but I could not find a way to create a BAK-file from my azure sql db. Please help.

Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47
Manu
  • 1,290
  • 5
  • 17
  • 32
  • **exact** duplicate of [make a backup for azure database](https://stackoverflow.com/questions/42991354/make-a-backup-for-azure-database), including the answer... – underscore_d Jun 06 '18 at 14:56

2 Answers2

12

However my new host allows to import sql db backup-files (.BAK) only;

SQL Azure doesn't provide a native way to generate '.bak' format backup file. If you did need this format file, you could import the BACPAC File to a local SQL Server which supports importing BACPAC File. After that, a new User Database will be created. Then you could generate a '.bak' format file from the local SQL Server.

In addition, you also could try a tool named SqlAzureBakMaker which could make '.bak' file for you easily.

Amor
  • 8,325
  • 2
  • 19
  • 21
  • 2
    This kills the purpose for me, I wanted the .bak file for index fragmentation to make tests on local. But it recreates indexes. – Jamshaid K. Sep 23 '21 at 07:00
1

In Azure portal:

  1. In the SQL Server database page, click on 'Export'

enter image description here

  1. Select a Storage Account and a Container, and click 'Ok'
  2. Go to your Storage accounts page
  3. Select the previously selected Storage account
  4. At the sub-navigation-menu > Data-storage section > Containers > select the used Container
  5. You should find the exported .bac file shortly after, you can download it. enter image description here

Hope it helps.

Mayer Spitz
  • 2,577
  • 1
  • 20
  • 26