views:

326

answers:

3
+1  Q: 

SQL Azure Backups

Has anyone come up with a good way to do backups of SQL Azure databases?

The two approaches seem to be SSIS or BCP. SSIS looks like it requires a local install of MS SQL 2008 which I don't have. BCP looks a bit more promising but I haven't managed to find any examples of using it with SQL Azure as of yet.

+3  A: 

At the PDC09 they announced SQL Azure Data Sync, which was an early preview that is designed to let you keep your local SQL Server in sync with an Azure SQL Server.

In terms of database backups for maintenance etc, then of course that is part of the service you pay for with Azure that MS manage.

The sync framework team have a blog on a number of issues surrounding data syncronisation between Azure and a local DB - http://blogs.msdn.com/sync/default.aspx

Andrew
That's a bit convoluted though. All I want is a straight forward way to do daily backups of my data in case something goes wrong.
sipwiz
On a high latency, non-reliable connection that you can get from Azure, you may have no other reliable choice.
Andrew
+1  A: 

I spent some time with BCP and got it working acceptably. It's a bit annoying to have to do the backup/restore table-by-table but I'll script it and that will do until Microsoft bring in a proper SQL Azure backup feature which is supposedly going to be the first half of 2010.

Backup:

bcp mydb.dbo.customers out customers.dat -n -U user@azureserver -P pass -S tcp:azureserver.database.windows.net

Restore:

bcp mydb.dbo.customers in customers.dat -n -U user@azureserver -P pass -S tcp:azureserver.database.windows.net
sipwiz
I'm trying this approach and bcp is contantly being disconnected by the server. SQL Azure is starting to seem like the wrong choice.
Pete
I've never had bcp disconnect for me. My biggest table probably takes around 2 or 3 minutes to back up.
sipwiz
A: 

I'm using www.sqlscripter.com to generate insert/update data scripts (to sync my local db). Not for free (shareware) but worth to try.

Klaus