Soft-deleted projects in Azure DevOps Server
This weekend I have run another migration from Azure DevOps Server to Azure DevOps and for a couple of times now I have been dealing with the following error message in the DataMigrationTool.log file while running the validation process.
Please restore the soft-deleted project(s) or delete them permanently before running the data import.
Apparently my customer has been doing some final cleanup in the on-prem environment before I started the production migration towards Azure DevOps and some projects are in a soft-deleted state.
In Azure DevOps Server there are 2 ways to delete a Team Project. You can (soft) delete a project via the web UI (via organization settings > projects) or you can (hard) delete the project via the Azure DevOps administration console.
Deleting projects from the web portal generate a soft-delete where projects get permanently deleted if not restored within 28 days. Projects deleted from the on-premises Azure DevOps Administration Console undergo a hard delete and cannot be restored.
So, to fix my validation error for the migration towards Azure DevOps I have two options:
- Permanently delete the project by using the TfsDeleteProject command.
TFSDeleteproject /force /collection:”<collectionUrl>" “<projectName>”
- Restore the soft-deleted projects via the web UI and afterwards perform a “hard” delete in the Azure DevOps administration console.