# Backup Contents

Each Cloudback backup of a GitLab project creates an encrypted ZIP archive (unless password protection is disabled) containing a complete snapshot of your project. This page details everything that is included.

## Summary

A GitLab backup includes **two main components**:

| Component            | Description                                                                                                        |
| -------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Repository Clone** | Bare Git clone with all branches, tags, refs, and LFS objects                                                      |
| **Metadata JSON**    | Structured JSON files for project settings, issues, merge requests, labels, milestones, boards, members, and notes |

## Archive Structure

```
backup-archive-root/
├── repo/
│   └── {ProjectName}.git/              # Bare git repository
├── project.json                        # Project metadata
├── issues.json                         # All issues
├── issue-notes.json                    # Comments on issues
├── issue-links.json                    # Issue relationships
├── merge-requests.json                 # All merge requests
├── merge-request-notes.json            # Comments on merge requests
├── labels.json                         # Project labels
├── milestones.json                     # Project milestones
├── members.json                        # Project members
└── boards.json                         # Issue boards with lists/columns
```

## Component Details

### 1. Repository Clone

The repository is cloned as a **bare Git repository** (`git clone --bare`) into the `repo/` directory.

**What's included:**

* All branches (including remote tracking branches)
* All tags
* All Git refs
* **Git LFS objects** - Cloudback attempts `git lfs fetch --all` after cloning. If LFS fetch fails, the clone itself is still preserved (LFS failure is non-blocking).

### 2. Metadata JSON Files

Cloudback downloads structured metadata via the GitLab REST API and saves it as JSON files:

| File                         | Contents                                                                                                                                   |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **project.json**             | Project settings: name, description, visibility, default branch, feature flags (issues, MRs, wiki, CI/CD), merge request settings, topics  |
| **issues.json**              | All issues: title, description, state, labels, milestone, assignees, weight, time tracking (estimate + spent), due date, confidential flag |
| **issue-notes.json**         | All issue comments: body, author, timestamps, system/internal flags, diff note positions (for code-linked comments)                        |
| **issue-links.json**         | Issue relationships: relates\_to, blocks, is\_blocked\_by (deduplicated, same-project only)                                                |
| **merge-requests.json**      | All merge requests: title, description, state, source/target branches, labels, milestone, assignees, diff refs                             |
| **merge-request-notes.json** | All MR comments: body, author, timestamps, diff note positions (file path, line numbers for code review comments)                          |
| **labels.json**              | All project labels: name, color, description                                                                                               |
| **milestones.json**          | All milestones: title, description, state, start/due dates                                                                                 |
| **members.json**             | All project members: username, name, state, access level (Guest/Reporter/Developer/Maintainer/Owner)                                       |
| **boards.json**              | Issue boards with their columns/lists: board name, label-based columns with position ordering                                              |

## Backup Statistics

During the backup process, Cloudback collects the following statistics:

* Number of issues
* Number of issue notes (comments)
* Number of merge requests
* Number of merge request notes
* Number of labels
* Number of milestones
* Number of boards

These statistics are displayed on the **Project Details** page in the Cloudback dashboard.

## Learn More

* [GitLab: Getting Started](/gitlab/installation-guide.md) - Connect your account
* [GitLab: Restoring Data](/gitlab/restore.md) - How to restore from a backup
* [Cross-Platform Restore](/data-restoration/cross-platform-restore.md) - GitHub ↔ GitLab restore
* [Password-Protected Archives](/security-and-compliance/password-protected-archives.md) - Encryption details
* [Data Deduplication](/managing-backups/data-deduplication.md) - How deduplication works


---

# 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/gitlab/backup-contents.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.
