# Restore

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](https://github.com/cloudback/docs-internal/blob/docs/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](https://github.com/cloudback/docs-internal/blob/docs/data-restoration/restoring-a-backup.md) - General restore workflow
* [Bulk Restore](https://github.com/cloudback/docs-internal/blob/docs/data-restoration/bulk-restore.md) - Restoring multiple repositories at once


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
