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.

  1. Go to the Cloudback Restore Application installation page.

  2. Select the target GitHub account (organization or user) where you want to restore the data.

  3. 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.

  1. Navigate to the GitHub settings for your target organization.

  2. In the left sidebar, go to Security > Secrets and variables > Actions.

  3. Click the Variables tab and select New organization variable.

  4. 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".

  5. Click Add variable to save.

Create organization variable

Step 3: Initiate the Restore

Now you are ready to start the restore process from your Cloudback dashboard.

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?