# Backup Contents

Cloudback backs up your Azure DevOps repositories, including both the code and important metadata. This document explains what is included in an Azure DevOps backup and what is planned for future releases.

You can learn how to view the details of a backup on the [Backup Details](https://docs.cloudback.it/dashboard/backup-details) page.

## What is Included in a Backup?

Here is the complete list of data included in an Azure DevOps backup archive:

### Repository Content

* **Bare Git Clone**: A complete [bare clone](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---bare) of the repository including:
  * All branches
  * All tags
  * Complete commit history
  * All refs
* **Git LFS Objects**: All [Git Large File Storage](https://git-lfs.com/) objects are backed up via `git lfs fetch --all` after the repository clone

### Pull Request Data

Cloudback backs up detailed pull request information:

* **Pull Request Details**:
  * Pull request ID and code review ID
  * Title and description
  * Status (active, abandoned, completed)
  * Source and target branches
  * Merge status
  * Draft status
  * Creation and completion dates
  * Created by and closed by user information
  * Completion options (merge strategy, delete source branch, squash merge, bypass policy)
* **Pull Request Commits**:
  * Commit IDs and URLs (references to commits included in the PR)
  * Full commit content (messages, authors) is preserved in the bare Git clone
* **Pull Request Reviewers**:
  * Reviewer identities
  * Vote status (approved, approved with suggestions, no response, waiting for author, rejected)
  * Required reviewer flags
* **Pull Request Threads and Comments**:
  * All comment threads
  * Individual comments with content
  * Comment authors
  * Thread status (active, fixed, won't fix, closed, by design, pending)
  * Thread context (code location information)
  * Comment timestamps
  * Users who liked comments
* **Pull Request Labels**:
  * Label names
  * Label IDs
  * Active status
* **Pull Request Attachments**:
  * Attachment files (downloaded and stored in the archive)
  * Attachment metadata (name, description, content hash)
  * Uploader information
  * Upload timestamps
* **Work Item References**:
  * Links to associated work items (work item content not yet backed up)

### Backup Archive Structure

When you download a backup, the archive contains the following structure:

```
backup-archive/
├── backup.json                          # Archive metadata (version, subject type, repository name)
├── pull-requests.json                   # All pull request data with threads, labels, reviewers
├── repo/
│   └── {repository-name}.git/           # Bare Git repository
│       ├── objects/                     # Git objects
│       ├── refs/                        # Branch and tag references
│       ├── config                       # Git configuration
│       └── ...
└── pr-{pullRequestId}-attachments/      # Attachment files for each PR
    ├── {attachmentId}_{filename}
    └── ...
```

### Backup Metadata

Each backup records the following counts for quick reference:

| Metadata                           | Description                            |
| ---------------------------------- | -------------------------------------- |
| Number of Pull Requests            | Total count of pull requests backed up |
| Number of Pull Request Attachments | Total attachments across all PRs       |
| Number of Pull Request Labels      | Distinct labels used                   |
| Number of Pull Request Threads     | Total comment threads                  |

## Viewing Backup Contents

You can view the contents of a backup archive by downloading it and extracting the contents.

> **Note**: For [password-protected archives](https://docs.cloudback.it/security-and-compliance/password-protected-archives), you will need to enter the password to extract the contents.

Pull request data is stored in JSON format in `pull-requests.json`. The file contains an array of pull request objects with all associated metadata including threads, comments, labels, and reviewer information.

## Learn More

* [GitHub Backup Contents](https://docs.cloudback.it/github/backup-contents) - Compare with GitHub backup contents
* [Backup Details](https://docs.cloudback.it/dashboard/backup-details) - View backup details in the dashboard
* [Password-Protected Archives](https://docs.cloudback.it/security-and-compliance/password-protected-archives)
* [Download Backups](https://docs.cloudback.it/data-restoration/download-backups)
* [Restoring a Backup](https://docs.cloudback.it/data-restoration/restoring-a-backup)
