Team,
How to take backup of azure repo and is there any way to restore azure repository.
if someone deleted azure repo then how can restore this.
Thank you.
Team,
How to take backup of azure repo and is there any way to restore azure repository.
if someone deleted azure repo then how can restore this.
Thank you.
There is no way from VSTS web portal to restore a deleted repo, but two nice REST APIs are out there for you to manage soft-deleted git repo.
a. Create PAT
b. Retrieve soft-deleted git repositories from the recycle bin.
GET https://dev.azure.com/{organization}/{project}/_apis/git/recycleBin/repositories?api-version=5.0-preview.1
c. Recover a soft-deleted Git repository.
Note: Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable.
PATCH https://dev.azure.com/{organization}/{project}/_apis/git/recycleBin/repositories/{repositoryId}?api-version=5.0-preview.1
Request Body:
{
"deleted": "false"
}
Result:
Here are samples to work with Git Recycle Bin through PowerShell and Rest API: