> For the complete documentation index, see [llms.txt](https://docs.cloudback.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudback.it/azure-devops/restore.md).

# Restore

Learn how to restore Azure DevOps repository backups using Cloudback, including the authorization flow and what gets restored.

Cloudback can restore your Azure DevOps repository data from any backup archive. This includes the full Git repository, pull requests with review threads and comments, labels, and attachments.

For the general restore workflow (how to initiate a restore, select a target, and monitor progress), see [Restoring a Backup](/data-restoration/restoring-a-backup.md).

## Restore Authorization

Cloudback uses a separate OAuth application for restore operations, following the principle of least privilege:

* **Backup** uses read-only access to clone repositories and download metadata
* **Restore** uses read-write access to create repositories and push data

If this is your first time restoring, you will be prompted to authorize on the Microsoft consent page. Write access is only granted when you explicitly initiate a restore.

## Target Selection

* Select the target **organization** and **project**
* Enter the new **repository name**
* A new repository is always created - you cannot restore to an existing repository

## What Gets Restored

| Entity              | Details                                                                                               |
| ------------------- | ----------------------------------------------------------------------------------------------------- |
| **Repository**      | All branches, tags, and refs via `git push --mirror`                                                  |
| **Pull Requests**   | Source branch, target branch, title, description                                                      |
| **Review Threads**  | Status (active, fixed, won't fix, closed, by design, pending), file context (path and line positions) |
| **Thread Comments** | Comment body with original author and timestamp                                                       |
| **PR Labels**       | Label names applied to each pull request                                                              |
| **PR Attachments**  | Files attached to pull requests                                                                       |

> **Note**: Original author information and creation dates are embedded as text in PR descriptions and comments, since the Azure DevOps API does not support creating entities on behalf of other users.

## Learn More

* [Azure DevOps Backup Contents](/azure-devops/backup-contents.md) - What data is in each backup
* [Restoring a Backup](/data-restoration/restoring-a-backup.md) - General restore workflow
* [Bulk Restore](/data-restoration/bulk-restore.md) - Restoring multiple repositories at once


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cloudback.it/azure-devops/restore.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
