Since you have delegated a part of your database to the remote Azure instance, when you perform a database backup, only local and eligible data will be backed up; remote data is the responsibility of the Azure service. By default, Azure automatically creates storage snapshots at least every 8 hours and retains them for seven days so that you can restore data to a point in time (by default, 21 points). You can change this behavior and increase the number of hours or backup frequency by using the system stored procedure sys.sp_rda_set_rpo_duration. Since the Azure service is not free, this can have additional costs.
As expected, to remotely restore a database you have to log in to the Azure portal. How to restore a live Azure database to an earlier point in time using the Azure portal is shown in the following screenshot:
To restore your Azure database to an earlier point in time, you need to perform the following steps:
- Log in to the Azure portal.
- On the left-hand side of the screen, select BROWSE and then select SQL Databases.
- Navigate to your database and select it.
- At the top of the database blade, click on Restore.
- Specify a new Database name, select a Restore Point, and then click on Create.
- The database restore process will begin and can be monitored using NOTIFICATIONS.
After you restore the local SQL Server database, you have to run the sys.sp_rda_reauthorize_db stored procedure to re-establish the connection between the stretch-enabled SQL Server database and the remote Azure database. The same action is required if you restore the Azure database with a different name or in a different region. You can also restore a deleted database up to 7 days after dropping it. The SQL Server Stretch Database service on Azure takes a database snapshot before a database is dropped and retains it for seven days.