user14091575
user14091575

Reputation: 81

How to recover a deleted pipeline on AzureDevops SAAS

We have deleted a pipeline accidentally, we need to recover it but how?

Thanks for your help

Upvotes: 7

Views: 12628

Answers (3)

Shehan Weerasooriya
Shehan Weerasooriya

Reputation: 822

Azure DevOps services gives an out of the box solution for this now. Simply go to the pipelines overview and click on the 3 dots, click on the view deleted pipelines and recover the pipeline. enter image description here

Upvotes: 8

Kevin Lu-MSFT
Kevin Lu-MSFT

Reputation: 35194

As far as I know, this is achievable. But you need to use Rest API to restore the deleted build pipeline.

Here is the Rest API:

PATCH https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}?deleted=false&api-version=5.1

It could restore the deleted build definition and build history.

Here is my restored pipeline:

enter image description here

Upvotes: 3

Matt
Matt

Reputation: 4045

Per the very explicit warning message, this is not something that can be recovered. At best if you were using the YAML, then you probably will still have your pipeline configuration in the repo. But you have probably lost the build history and associated artifacts.

enter image description here

Upvotes: 2

Related Questions