Wiki source code of MI Restore to Staging From Live
Version 9.1 by Phillip Swanepoel on 2025/03/17 12:42
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.2 | 1 | |
| 2 | |||
| |
9.1 | 3 | 1. Pull newest scripts from repo using D:/ebsphere/devops/setup-scripts/setup-new.ps1 |
| |
1.7 | 4 | 1. Stop all services including web site for staging on VM |
| 5 | |||
| |
7.1 | 6 | 1. Drop Old DB on Azure portal |
| |
1.2 | 7 | 11. drop existing connections |
| 8 | |||
| |
8.1 | 9 | 1. Restore DB from Live from last PITR or latest Full backup if DB age is not important |
| |
1.2 | 10 | |
| |
7.1 | 11 | 1. Give yourself access to the admin group via the powershell script - if needed |
| |
1.22 | 12 | |
| |
1.19 | 13 | 1. Wait for group policy SQL JOB [roughly 5-10 minutes] to create groups |
| 14 | |||
| |
1.18 | 15 | 1. Run post restore access script [[SKL_sqlmi_accesss.sql - Repos (azure.com)>>url:https://dev.azure.com/ebsphere/ebsphere/_git/dbs?version=GBmaster&path=/src/setup_scripts/SKL_sqlmi_accesss.sql]] |
| |
1.7 | 16 | 11. [TODO] source passwords from vault |
| |
1.28 | 17 | 11. set clearLogins = 2 |
| |
1.8 | 18 | 11. TODO |
| |
1.2 | 19 | |
| |
1.23 | 20 | 1. TODO - post restore script db settings etc |
| |
3.1 | 21 | 11. recreate tblDocuments synonym |
| |
4.1 | 22 | 11. tblAudit if applicable |
| |
1.19 | 23 | |
| |
1.2 | 24 | 1. Run dba.dbo.sp_scan_db script for '%[_]Live[_]%' |
| 25 | 11. correct all config found and repoint to Staging | ||
| |
6.1 | 26 | 11. TODO automate (some of the config correcting statements can be generated using [dba].[devops].[sp_change_db_env_post_restore]) |
| |
1.3 | 27 | 1. Start all services |
| 28 | 11. check logs to make sure no connections issues | ||
| |
1.2 | 29 | |
| 30 |