This project contains a set of scripts to help migrate Azure DevOps projects, including work items, dashboards, queries, libraries, and pipelines from one organization/project to another.
- Bash shell environment
- Azure CLI installed and configured
- Appropriate permissions in both source and target Azure DevOps organizations
main.sh- Main script that orchestrates the migration processsetup.sh- Initial setup and configurationinit.sh- Work Items list initializationvariables.sh- Contains shared variables used across scriptsdashboards.sh- Handles dashboard migrationworkitems.sh- Handles work item migrationqueries.sh- Handles query migrationlibraries.sh- Handles library migrationpipelines.sh- Handles pipeline migrationclean.sh- Cleanup operations
- Open
main.shin a text editor - Modify the following variables at the top of the file:
OLD_PROJECT_NAME="your-source-project-name" NEW_PROJECT_NAME="your-target-project-name" OLD_ORGANIZATION_NAME="your-source-organization" NEW_ORGANIZATION_NAME="your-target-organization"
- Save the file
- Run the migration:
bash main.sh
The script will execute the following steps in order:
- Initial setup and configuration
- Variable initialization
- Dashboard migration
- Work item migration
- Query migration
- Library migration
- Pipeline migration
- Cleanup operations
The script includes error handling and will stop if any step fails. Check the error message to identify which step failed and troubleshoot accordingly.
- Make sure you have the necessary permissions in both source and target organizations
- The migration process may take some time depending on the amount of data being migrated
- It's recommended to test the migration with a small project first
- Your first retrieve process will take much longer than the next
- If the work items list from the old organization is not retrieved first, the script will automatically fetch it during the migration process