Wiki source code of DR Pipelines
Last modified by Nikhil Singh on 2026/07/03 08:27
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | ==== 1. Managed Instance Restore ==== | ||
| 2 | |||
| 3 | Pipeline: [[https:~~/~~/dev.azure.com/ebsphere/ebsphere/_build?definitionId=17>>https://dev.azure.com/ebsphere/ebsphere/_build?definitionId=17]] | ||
| 4 | |||
| 5 | This pipeline restores one or more databases from a source Azure SQL Managed Instance to a target Managed Instance, primarily for disaster recovery scenarios. It supports geo-restore, optional Start/stop, storage resizing (upscale/downscale), Deletion of restored databases, Pre-Delete (checks if database exists first and then deletes to allow restore) . Databases can be selected individually or via wildcard filters (for example, *Live*), and the pipeline produces a detailed execution report published to both Azure DevOps artifacts and Azure Blob Storage. | ||
| 6 | |||
| 7 | |||
| 8 | ==== 2. Managed Instance Object Migration ==== | ||
| 9 | |||
| 10 | Pipeline: [[https:~~/~~/dev.azure.com/ebsphere/ebsphere/_build?definitionId=23>>https://dev.azure.com/ebsphere/ebsphere/_build?definitionId=23]] | ||
| 11 | |||
| 12 | This pipeline migrates server-level and database-level objects between Azure SQL Managed Instances, including logins, triggers, and schedules. It uses dbatools to selectively migrate objects based on filters or run all supported object types in a single execution. The pipeline supports wildcard-based login selection, exclusion lists, verbose logging, and controlled execution through flags, and publishes detailed migration output as Azure DevOps build artifacts. | ||
| 13 | |||
| 14 | ==== ==== | ||
| 15 | |||
| 16 | ==== 3. Extract DB Objects ==== | ||
| 17 | |||
| 18 | Pipeline: [[https:~~/~~/dev.azure.com/ebsphere/ebsphere/_build?definitionId=28>>https://dev.azure.com/ebsphere/ebsphere/_build?definitionId=28]] | ||
| 19 | |||
| 20 | This pipeline exports selected server-level and database-related objects from a source Azure SQL Managed Instance, including logins, triggers, schedules, agent jobs, and server roles. It uses dbatools to selectively extract individual object types or all supported objects in a single run, with optional verbose logging. The extracted objects are packaged and published to Blob Storage and as Azure DevOps build artifacts for later review or deployment. | ||
| 21 | |||
| 22 | |||
| 23 | ==== 4. Deploy DB Objects ==== | ||
| 24 | |||
| 25 | Pipeline: [[https:~~/~~/dev.azure.com/ebsphere/ebsphere/_build?definitionId=29>>https://dev.azure.com/ebsphere/ebsphere/_build?definitionId=29]] | ||
| 26 | |||
| 27 | The **Deploy DB Objects** pipeline deploys previously extracted SQL Managed Instance objects to a target Managed Instance using artifacts stored in Azure Blob Storage. It supports selective deployment through wildcard filters, optional verbose logging, and handles objects such as agent jobs and related server-level components. The pipeline authenticates to Azure, retrieves the specified object set, applies it to the target instance, and publishes deployment results as Azure DevOps build artifacts. | ||
| 28 | |||
| 29 | |||
| 30 | ==== 5. Stop Managed Instance ==== | ||
| 31 | |||
| 32 | Pipeline: [[https:~~/~~/dev.azure.com/ebsphere/ebsphere/_build?definitionId=30>>https://dev.azure.com/ebsphere/ebsphere/_build?definitionId=30]] | ||
| 33 | |||
| 34 | The **Stop Managed Instance (DR)** pipeline automatically stops the designated disaster recovery Azure SQL Managed Instance on a scheduled basis to reduce operational costs when the instance is not in use. It authenticates to Azure using a service connection, executes a PowerShell script to stop the target Managed Instance. Pipeline is scheduled for 6 pm every day. | ||
| 35 | |||
| 36 | |||
| 37 | === === |