Restore
Learn how to restore GitHub repository backups using Cloudback, including the restore application, cross-account restore, source restrictions, and what gets restored.
GitHubCloudback can restore your GitHub repository data from any backup archive. This includes the full Git repository, issues, pull requests, releases, labels, milestones, projects, and more. You can restore to the same account, a different account, or even from a non-GitHub backup (GitLab) via Cross-Platform Restore.
Overview
Restoring a GitHub repository involves:
- Installing the Cloudback Restore Application (separate from the backup app)
- Selecting the target account and repository name
- Executing the restore - Cloudback creates the repository, pushes the code, and restores all metadata
Prerequisites
- A successful backup archive (from GitHub or GitLab)
- A target GitHub account (personal or organization) to restore into
- The Cloudback Restore Application installed on the target account
Restore Application
Cloudback uses two separate GitHub Apps following the principle of least privilege:
- Backup App (read-only) - installed during setup, used for daily backups
- Restore App (read-write) - installed separately, only when you need to restore
Installing the Restore Application
- Go to the Cloudback Restore Application installation page.
- Select the target GitHub account (organization or user).
- Grant the requested permissions - read and write access to code and metadata.
Security Tip: The Restore Application is only needed for the duration of the restore. Consider uninstalling it from your target account once the restore is complete.
Step-by-Step Restore Process
Step 1: Initiate Restore
- Navigate to your repository in the Cloudback dashboard
- Open the Backups tab and find the backup you want to restore
- Click the Restore button
Alternatively, select one or more repositories on the dashboard and click Restore in the toolbar to start a Bulk Restore.
Step 2: Select Target
- Enter the target GitHub account name (personal or organization)
- Click Start Restore
The repository name and visibility are carried over from the backup automatically.
Step 3: Execute Restore
Click Restore to begin. The process runs in the background - you can close the page and return later. A notification will appear when the restore completes, and Cloudback emails you the result. See Email Notifications for the recipient settings.
What Gets Restored
| Entity | Details |
|---|---|
| Repository | All branches, tags, refs via git push --mirror, plus LFS objects |
| Issues | Title, body, state, labels, milestone, assignee, issue types, sub-issues |
| Issue Comments | Body, author, dates |
| Pull Requests | Unmerged PRs with title, body, state, labels, milestone, branches, reviews, review comments, and requested reviewers |
| Commit Comments | Comments on specific commits |
| Milestones | Title, description, state, due date |
| Labels | Name, color, description |
| Releases | Tag, name, body, assets (uploaded files) |
| Projects | ProjectV2 in current backups; classic projects from older archives |
| Collaborators | Repository collaborator invitations |
| Webhooks | Webhook URLs and configuration |
| Repository Settings | Description, homepage, merge methods, topics |
Not Restored
- Merged pull requests - skipped during restore (the commits are already in the repository history)
- Wiki pages - not restored
- GitHub Actions workflows - restored as files in the repository, but workflow run history is not restored
Cross-Account Restore
You can restore backups to a different GitHub account than the one that created the backup. This is useful for:
- Migrating repositories between organizations
- Disaster recovery to a standby account
- Restoring data to an account that doesn't have Cloudback installed
- Restoring between GitHub Enterprise Managed User (EMU) and non-EMU accounts
The process is the same as a standard restore - just select a different target account in Step 2. The Restore Application must be installed on the target account.
Restricting Allowed Source Accounts (Optional)
By default, Cloudback allows restores from any source account. To restrict which source accounts can restore to your organization, create a GitHub Actions organization variable:
- Navigate to the GitHub settings for your target organization
- Go to Security > Secrets and variables > Actions
- Click the Variables tab → New organization variable
- Enter:
- Name:
CLOUDBACK_ALLOWED_RESTORE_SOURCE - Value: Source account name(s), each prefixed with the platform. Separate multiple entries with commas.
- GitHub source:
github:source-org-1 - GitLab source:
gitlab:source-group-1 - Mixed example:
github:source-org-1,gitlab:source-group-2
- GitHub source:
- Repository access: Can be left as "Public repositories"
- Name:
- Click Add variable
Note: This variable is only checked for organization targets. Personal account targets skip this check. Organization owners also bypass this check - they can restore from any source without setting the variable.
Learn More
- Restoring a Backup - General restore documentation
- Bulk Restore - Restoring multiple repositories at once
- Cross-Platform Restore - GitHub ↔ GitLab bidirectional restore
- GitHub Backup Contents - What data is in each backup
- Known Issues - Troubleshooting restore errors