Automate db restore to azure

  • I would like to find a way to backup one of our database on premise sql server and restored it to an Azure SQL database on cloud nightly. We are using SQL server 2017 on premise.
    This is a small database about 3 GB. This is for disaster recovery purpose.
    We only have Azure SQL database, no Azure VM.
    So availability group is not an option.
    Transaction Replication does not  work for us for we have some tables have composite Primary keys or no primary keys. Same reason not work with data sync tool.

    I think for  now I only consider to use Backup and restore.
    I have figured out the first step to schedule a SQL agent job on our premise SQL server to backup the database to a storage account.
    It works fine.
    Now second step I would like also to automate the job to restore the Azure database with the backups I copied to storage account.

    Any approach or scripts I can use? and how to automate...

    Thanks

  • sqlfriends - Tuesday, July 3, 2018 1:05 PM

    I would like to find a way to backup one of our database on premise sql server and restored it to an Azure SQL database on cloud nightly. We are using SQL server 2017 on premise.
    This is a small database about 3 GB. This is for disaster recovery purpose.
    We only have Azure SQL database, no Azure VM.
    So availability group is not an option.
    Transaction Replication does not  work for us for we have some tables have composite Primary keys or no primary keys. Same reason not work with data sync tool.

    I think for  now I only consider to use Backup and restore.
    I have figured out the first step to schedule a SQL agent job on our premise SQL server to backup the database to a storage account.
    It works fine.
    Now second step I would like also to automate the job to restore the Azure database with the backups I copied to storage account.

    Any approach or scripts I can use? and how to automate...

    Thanks

    Have a look at this article, think that will do the job.
    😎

  • Erikur has given you a start, but here's the thing. If you restore to Azure, and you go over there for DR, how do you get back? That can be tricky, and time consuming.

    Why not just set up an Azure VM? If you have a subscription, it's not hard, and this would allow you to use Log shipping or some other method to fail back.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply