1
votes

I use Azure db(v12 server version).


My needs:

  1. I need db in my local environment for development and testing purposes, and it need to be up to date;
  2. I know that if i delete db server(assumption) i wont be able to restore my db.

I know that i can generate bacpac manually but this is not convenient because i need to make copy of db first(because of transaction consistency) and than generate bacpac file from that copy.

So i would like to configure automated scheduled export to bacpac files, for example to blob container. I have tried to configure it using old portal but it copies db instead of generating bacpacs. I have read many articles and i didn't find any answer.

1
Can you elaborate on this but it copies db instead of generating bacpacsTheGameiswar
You could use PowerShell to make this happen. You'll have to have a Windows Agent schedule the run times. Powershell will connect to the database instance, create the bacpac, then store it wherever you desire (local or cloud). The tricky part will be restoring a bacpac from azure to on premise.Shannon Lowder

1 Answers

0
votes

Please follow below steps and it will generate bacpac to the Azure storage

  1. Go to Azure SQL Databases
  2. Select the required database
  3. Click on Configure
  4. Set the EXPORT STATUS to AUTOMATIC
  5. Specify the STORAGE ACCOUNT
  6. Set the FREQUENCY
  7. Provide SERVER LOGIN NAME and Password
  8. DO NOT DO ANYTHING FOR CREATE FROM EXPORT option
  9. Save the settings and it will successfully generate the bacpac at the given interval time

Let me know if the above steps helps you.