Backing up an Azure database

This site uses a heavily-modified version of GraffitiCMS, an ASP.NET blog backend that was open-sourced way back when. I moved it to be hosted on Microsoft Azure about 18 months ago, and, to be honest, haven’t really worried about backing up the data contained within. However, over the past couple of virus-laden months, I’ve been considering updating the whole shebang to use DevExpress ASP.NET controls and layouts, and then writing about the experience over several blog posts.

First things first though: making sure I have a starting point. I have set up a (private) Git repo to contain the current version of the code, and that’s backed up daily. But, it may happen that I have to tweak the database schema and the existing data (there’s now 600 posts and 1,000 comments) to fit my code overhaul. So, it would be best that I have a backup of all that data over in the Azure cloud. How do I do that? (And this post is, in effect, a reminder to myself how it is done.)

A quick bit of searching later: Azure Tips and Tricks, Tip 140. In essence: fire up SSMS (SQL Server Management Studio, here’s the download link), connect to your Azure database, right-click on it, select Tasks | Export Data-tier Application. It’ll create a bacpac file in the local folder you specify, and that will contain the schema and the data in the original database. The article goes on to show how to export that data and schema from the bacpac file should you want to. I’m perfectly happy to keep it all in that file for now.

So, I celebrated by exporting all the Azure databases that I had created over the years. Wheee! Now onto the next step.

Fixing software -- banner

Loading similar posts...   Loading links to posts on similar topics...

2 Responses

 avatar
#1 Paul Usher said...
09-Jul-20 1:30 AM

I use SqlBackupAndFTP to back up all my Azure databases every day on schedule :)

julian m bucknall avatar
#2 julian m bucknall said...
09-Jul-20 9:23 AM

Paul: Gotta look that one up...

Cheers, Julian

Leave a response

Note: some MarkDown is allowed, but HTML is not. Expand to show what's available.

  •  Emphasize with italics: surround word with underscores _emphasis_
  •  Emphasize strongly: surround word with double-asterisks **strong**
  •  Link: surround text with square brackets, url with parentheses [text](url)
  •  Inline code: surround text with backticks `IEnumerable`
  •  Unordered list: start each line with an asterisk, space * an item
  •  Ordered list: start each line with a digit, period, space 1. an item
  •  Insert code block: start each line with four spaces
  •  Insert blockquote: start each line with right-angle-bracket, space > Now is the time...
Preview of response