# Cross-Platform Restore

Cloudback supports **bidirectional cross-platform restore** between GitHub and GitLab. You can restore a GitHub backup into a GitLab project, or a GitLab backup into a GitHub repository - with automatic data format conversion.

## Supported Entities

| Entity                             | GitHub → GitLab | GitLab → GitHub | Notes                                                                                                                                                                              |
| ---------------------------------- | :-------------: | :-------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Repository (Git)**               |        ✓        |        ✓        | All branches, tags, refs pushed via `git push --mirror`                                                                                                                            |
| **Issues**                         |        ✓        |        ✓        | Title, body, state, dates, assignee                                                                                                                                                |
| **Labels**                         |        ✓        |        ✓        | Name, color, description                                                                                                                                                           |
| **Milestones**                     |        ✓        |        ✓        | Title, description, state, dates                                                                                                                                                   |
| **Issue Comments**                 |        ✓        |        ✓        | Body, author, dates                                                                                                                                                                |
| **Pull Requests / Merge Requests** |        ✓        |        ✓        | Title, body, state, branches, draft status                                                                                                                                         |
| **PR/MR Comments**                 |     Partial     |        -        | GitHub→GitLab: PR comments are included in the issue comments file and may be restored as issue notes. GitLab→GitHub: MR notes are extracted but not written to the GitHub output. |
| **Boards**                         |        ✓        |        ✓        | Column structure and issue assignments                                                                                                                                             |
| **Time Tracking**                  |        -        |    Appended\*   | GitLab-specific; appended to issue body on GitHub                                                                                                                                  |
| **Weight**                         |        -        |    Appended\*   | GitLab-specific; appended to issue body on GitHub                                                                                                                                  |
| **Health Status**                  |        -        |    Appended\*   | GitLab-specific; appended to issue body on GitHub                                                                                                                                  |
| **Confidential Flag**              |        -        |    Appended\*   | GitLab-specific; appended to issue body on GitHub                                                                                                                                  |

*\* GitLab-specific fields that have no GitHub equivalent are preserved by appending them as a metadata block at the end of the issue body.*

## GitLab-Specific Fields in GitHub

When restoring GitLab data to GitHub, fields without a direct equivalent are appended to the issue body as a formatted metadata block:

```markdown
[Original issue body]

---

**Weight:** 5 | **Health Status:** On Track | **Start Date:** 2024-01-01 | **Due Date:** 2024-12-31 | **Confidential:** Yes | **Time Estimate:** 3600s | **Time Spent:** 1800s
```

This ensures no data is lost, even when the target platform doesn't support the field natively.

## How to Perform a Cross-Platform Restore

### GitHub → GitLab

1. Navigate to a **GitHub repository** in the Cloudback dashboard
2. Open the **Backups** tab and select a backup
3. Click **Restore**
4. In the restore wizard, select **GitLab** as the target platform
5. Select the target namespace (personal account or group) from the list of connected accounts - clicking on the namespace starts the restore immediately
6. If no GitLab account is connected, click **Connect New GitLab Account** to authorize via OAuth first

### GitLab → GitHub

1. Navigate to a **GitLab project** in the Cloudback dashboard
2. Open the **Backups** tab and select a backup
3. Click **Restore**
4. In the restore wizard, select **GitHub** as the target platform
5. Enter the target GitHub account name
6. Click **Start Restore** - you will be guided through installing the GitHub restore app if needed

## Learn More

* [GitLab: Getting Started](https://docs.cloudback.it/gitlab/installation-guide) - Connect your GitLab account
* [GitLab: Backup Contents](https://docs.cloudback.it/gitlab/backup-contents) - What data is in GitLab backups
* [GitLab: Restoring Data](https://docs.cloudback.it/gitlab/restore) - Same-platform GitLab restore
* [Restoring a Backup](https://docs.cloudback.it/data-restoration/restoring-a-backup) - General restore documentation
* [GitHub Backup Contents](https://docs.cloudback.it/github/backup-contents) - What data is in GitHub backups
