Cross-Account Restore
Learn how to restore GitHub repository backups to a different GitHub account (organization or user) using Cloudback's cross-account restore feature.
Cloudback's cross-account restore lets you restore repository backups from one GitHub account to another. This is useful for migrating repositories, disaster recovery, or restoring data to an account that doesn't have Cloudback installed. You can even restore between GitHub Enterprise Managed User (EMU) and non-EMU accounts.
This guide will walk you through the entire process, from setup to completion.
Prerequisites
Before you begin, please ensure you have the following:
Owner permissions in the target GitHub organization.
The exact GitHub organization name of the source account(s).
How to Perform a Cross-Account Restore
The process is similar to a standard restore, but with a few initial setup steps in the target account. You can perform a cross-account restore for a single repository or in bulk.
Step 1: Install the Cloudback Restore Application
First, you need to grant Cloudback permission to write data to the target account by installing our dedicated restore application.
Go to the Cloudback Restore Application installation page.
Select the target GitHub account (organization or user) where you want to restore the data.
Grant the application the requested permissions. This app requires read and write access to code and metadata to create the new repositories.
Security Tip: The Cloudback Restore Application is only needed for the duration of the restore. For security best practices, we strongly recommend uninstalling the application from your target account once the restore is complete.
Step 2: Authorize the Source Account in GitHub
Next, you must explicitly authorize the source GitHub organization to prevent unauthorized restores. You'll create a special organization variable in your target organization's GitHub settings.
Note: If you are restoring a backup from a personal user account (not an organization), you can skip this step.
Navigate to the GitHub settings for your target organization.
In the left sidebar, go to Security > Secrets and variables > Actions.
Click the Variables tab and select New organization variable.
Enter the following details precisely:
Name:
CLOUDBACK_ALLOWED_RESTORE_SOURCE
Value: The GitHub organization name(s) of the source account, prefixed with
github:
. For multiple organizations, separate them with commas.Example for one org:
github:source-org-1
Example for multiple orgs:
github:source-org-1,github:source-org-2
Repository access: You can leave this set to "Public repositories".
Click Add variable to save.

Step 3: Initiate the Restore
Now you are ready to start the restore process from your Cloudback dashboard.
For a single repository, follow the steps in the Restore to GitHub guide.
For multiple repositories, follow the steps in the Bulk Restore to GitHub guide.
During the restore process, Cloudback will use the installed application and check the organization variable to securely connect the source and target accounts.
Learn More
Last updated
Was this helpful?