MI Restore to Staging From Live
Version 1.27 by Rudi Marais on 2024/05/14 08:25
- Stop all services including web site for staging on VM
- Backup Old DB to storage account
- disable encryption if enabled, delete encryption key for DB
- TODO move to self managed keys
- enable compression!
- container for client
- disable encryption if enabled, delete encryption key for DB
- Drop Old DB
- drop existing connections
- drop existing connections
- Restore DB from Live from last PITR
- Give yourself access to the admin group via the powershell script
- Wait for group policy SQL JOB [roughly 5-10 minutes] to create groups
- Run post restore access script SKL_sqlmi_accesss.sql - Repos (azure.com)
- [TODO] source passwords from vault
- set clearLogins = 1
- TODO
- TODO - post restore script db settings etc
- Run dba.dbo.sp_scan_db script for '%[_]Live[_]%'
- correct all config found and repoint to Staging
- TODO automate
- Start all services
- check logs to make sure no connections issues