Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

converting SQL . BAK to SQL backpac format

Tags:

I have MSSQL .BAK file, and for logistical reason (the DB being huge for my infra) I want to convert the same to BacPac file, so that I could upload the same to Azure.

All this while I thought .BAK and BacPac are same, so there was error, is there a utility to get it converted?

like image 937
user1504387 Avatar asked Aug 21 '12 14:08

user1504387


People also ask

How do I export a SQL Server database to Bacpac?

Azure SQL Managed Instance does not currently support exporting a database to a BACPAC file using the Azure portal or Azure PowerShell. To export a managed instance into a BACPAC file, use SQL Server Management Studio (SSMS) or SQLPackage.

What is the difference between Bacpac and BAK file?

Bak files are snapshots of entire Database as it existed at a point in time and Bacpac files are snapshots of how the Database existed over the period of time while the backup was made.


1 Answers

They are different formats. "bacpac" files do not include Transaction logs and are not transitionally consistent by themselves. You can read more about it here "Windows Azure SQL Database Backup and Restore Strategy"

Your best path would be to restore the backup (".bak") of the database to a local server, and then to create a ".bacpac" file from the restored DB. You don't need the restored local copy of the DB to be high performance (other than for the purposes of extracting its data into the bacpac) so you can restore it onto a server that just has enough space to accommodate the data. That should help with the "the DB being huge for my infra" problem.

like image 99
BStateham Avatar answered Sep 20 '22 22:09

BStateham