make a backup for azure database

2019-07-25 06:09发布

问题:

I need to make a backup to my azure database, I'm trying with this command:

"C:\Program Files\Microsoft SQL Server\120\DAC\bin\SqlPackage.exe" /Action:Export /SourceServerName:"tcp:MyDataServer.database.windows.net,1433" /SourceDatabaseName:MyDatabase /SourceUser:MyUser /SourcePassword:MyPass /TargetFile:C:\backups\backup.bacpac

but it seems that the format that downloads it is "bacpac" and I need it to be ".bak", I tried to change the extension but says: "The TargetFile argument must refer to a file with a '.bacpac' extension "

Any idea how to download the database in ".bak" format?

回答1:

Any idea how to download the database in ".bak" format?

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 your local SQL Server to create a new User Database. Then you could generate a '.bak' format file from your local SQL Server.

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