Hi @sguidos,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
As I understand your concern about ensuring the database is up to date at the time of the restore.
Here are some steps to help you achieve this:
Stop the Web App: This will prevent any new writes to the database, ensuring that no new data is added after you stop the app.
Wait for the Backup: Since automatic backups occur every 5 to 10 minutes, wait for at least 10 minutes after stopping the Web App to ensure that the latest backup includes all the data up to the point when the app was stopped.
Check the Latest Backup Time: In the Azure Portal, when you go to restore the database, check the “Restore Point (UTC)” to confirm it reflects a time after you stopped the Web App. This will help ensure that the backup includes all recent changes.
Restore the Database: Proceed with restoring the database to the new SQL Managed Instance using the latest available restore point.
Update the Connection String: Once the restore is complete, update the Web App’s connection string to point to the new SQL Managed Instance.
Start the Web App: Finally, start the Web App to resume operations with the new database instance.
Additionally, you might want to consider using the database copy and move feature in Azure SQL Managed Instance, which allows for an online move operation with minimal downtime. This feature ensures that all changes from the source database are replicated to the destination database until you manually complete the operation, providing a more seamless transition.
For more information, please refer the documents:
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.