djangojazz
djangojazz

Reputation: 13232

Is there a way to programmatically backup and restore Azure database with a bacpac or similar?

So I am migrating a database from a local SQL Server 2014 to an Azure database. I migrated successfully using a bacpac and the connections are working fine. However I still want to perform backups and of course the old school file backup does not work. So I hunted around and saw that Microsoft recommends backing up to blob storage. At a cost of course along with other things.

My question is, is there an easy way to use SMO references or similar to just remotely make a bacpac stored locally and then used remotely as needed? My real issue is maintainability and if I ever wanted to switch back to local to not be so iron clad bound to azure methods. I feel a bacpac may do this.

So far I of course tried using file backups, which of course the syntax won't even work. I then started looking at this link: https://jasonstrate.com/2013/04/18/backing-up-azure-sql-database-to-the-cloud/ and was working on it.

Any help or suggestions are appreciated.

Upvotes: 1

Views: 393

Answers (1)

4c74356b41
4c74356b41

Reputation: 72151

If you are talking about Azure SQL it offers built-in backups up up 90 (not sure, 35 for sure) days without you having to do anything. Take a look here.

Upvotes: 1

Related Questions