# Recovering multiple repositories

## Recovery process

{% stepper %}
{% step %}
Get into the restore view using the following method:

1. Open the **GitHub** tab (**DevOps** > **GitHub**), then click the **Restore** button next to the organization whose backup you want to restore.

{% hint style="success" %}
You can also use the **Explore** button to restore your data.
{% endhint %}

2. Select the repositories you want to restore and click the **Restore selected** button in the top menu.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FmNS25z1KOBB3PfFGNgRt%2Fimage.png?alt=media&#x26;token=3f3e8bd0-0193-4276-af1b-53afae7ae3a0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
By clicking an individual repository, an aside will appear where you can select a **backup plan** and a **backup version** to restore. Click **Select** under your chosen backup copies to continue.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2F9oCXpuOJpHzsbHO1UouD%2Fimage.png?alt=media&#x26;token=67ea28c3-fed2-4afa-9a85-49a42c299563" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Select the destination for the restore process. You can choose one of the assigned organizations from any **Git** service or any device.
{% endstep %}

{% step %}
Next, select the destination where you want to restore the data.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2F9sOXAozZfCtXnwtyOIvC%2Fimage.png?alt=media&#x26;token=322dc2bc-f3a5-4451-acc5-d31f4a400109" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %} <mark style="color:red;">**Support for backing up projects (classic) has been removed.**</mark> It is now available only for restoring previously backed-up **projects (classic)** — when restored, **projects (classic)** are automatically converted into **projects v2**.
{% endhint %}

#### A. Restore to a Git organization

{% hint style="info" %}
During restoration to **GitHub**, the **Use existing projects instead of creating new ones option** becomes available. When restoring **projects v2**, this option restores the data into the existing projects rather than creating new ones.
{% endhint %}

**Git Organization** option allows you to choose the **Git** service (organization or project) where you want to restore your data. You can always restore it to its original location, but **Xopero ONE** also supports [cross-recovery](https://helpcenter.xopero.com/xopero-one-en/backup-and-recovery/devops/bitbucket-dc/recovery/cross-recovery) between different **Git** services, such as **Bitbucket** or **GitLab**.

In the **Restore settings**, you can configure the following options:

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FkQYWzYzp1hPpj3EmfMbJ%2Fimage.png?alt=media&#x26;token=de803230-73d0-4b41-959a-72ed3848c1ba" alt=""><figcaption></figcaption></figure>

When you toggle **Restoring repos with custom name** switch, a window will appear allowing you to rename one or more repositories.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2Fw4K2gqlJ9m5Gn2pGwhZc%2Fimage.png?alt=media&#x26;token=52255cc9-c679-4e7e-9a3e-5cd0c1d48ff1" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Restoring never overwrites existing repositories in the organization — if you do not choose a repository name, or if you enter the name of a repository that already exists in your organization, **the restore will fail**. To complete the restoration successfully, you must choose a unique repository name or select the **Add suffix to repo name** option so the restored repository keeps its original name with an automatically generated suffix.
{% endhint %}

#### B. Restore to a device

{% hint style="warning" %}
To restore a repository to a local device, you must have a **Git** client installed on that device.
{% endhint %}

{% hint style="danger" %}
You can restore **only the repository** (without metadata) when restoring data to local resources.
{% endhint %}

1. Select the destination device.
2. Make sure the device where you want to restore data has the **Xopero ONE agent** installed and the **Git** client added to the **PATH** environment variable. The **PATH** variable is usually configured automatically after **Git** installation (a system restart may be required). If it isn’t, set it manually to the path of the **git.exe** file: `C:\Program Files\Git\bin\git.exe`

{% hint style="info" %}
To configure the **PATH** variable, open the environment variables, select the **PATH** variable, and click the **Edit** button. Copy the path to the **git.exe** file and add it to the **PATH** variable.
{% endhint %}

3. Select the directory where you want the data to be restored.

{% hint style="success" %}
If a repository already exists in the selected folder, you can choose to overwrite the existing data.
{% endhint %}

4. Additionally, in the **Restore settings**, you can limit bandwidth usage during the recovery process.
   {% endstep %}

{% step %}
In **Device used to restore the data** section, choose the device that will be responsible for performing the restoration.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2Fl6PvR7U75hW4QGmJYnhw%2Fimage.png?alt=media&#x26;token=306cddba-eb4f-4742-8da5-abadb54854ec" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
After defining all parameters, click the **Start now** button to begin the restore process. When the process is complete, new repositories will be created in your organization account.

{% hint style="warning" %}
**Closed** or **merged** pull requests are recovered as **closed issues**.
{% endhint %}
{% endstep %}
{% endstepper %}

***

## Restoration time

Extensive testing and analysis have shown that restoring repositories with many issues and pull requests significantly prolongs the restoration process. This delay is caused by limitations within **GitHub**’s infrastructure and the API used for repository restoration.

To speed up the repository access, **it is recommended** to exclude issues and pull requests during the initial restore. Once the repository is restored, you can perform a subsequent restore—including issues and pull requests—under a different repository name. This approach ensures quick access while still allowing full restoration of repository content.

***

## Useful links and items

{% content-ref url="../../../../deployment-and-configuration/xopero-one-agent" %}
[xopero-one-agent](https://helpcenter.xopero.com/xopero-one-en/deployment-and-configuration/xopero-one-agent)
{% endcontent-ref %}

{% content-ref url="../../general/cross-recovery-for-devops-organizations" %}
[cross-recovery-for-devops-organizations](https://helpcenter.xopero.com/xopero-one-en/backup-and-recovery/devops/general/cross-recovery-for-devops-organizations)
{% endcontent-ref %}

{% content-ref url="../../general/lfs-recovery-for-devops-organizations" %}
[lfs-recovery-for-devops-organizations](https://helpcenter.xopero.com/xopero-one-en/backup-and-recovery/devops/general/lfs-recovery-for-devops-organizations)
{% endcontent-ref %}

{% content-ref url="../../general/wiki-recovery-for-devops-organizations" %}
[wiki-recovery-for-devops-organizations](https://helpcenter.xopero.com/xopero-one-en/backup-and-recovery/devops/general/wiki-recovery-for-devops-organizations)
{% endcontent-ref %}

{% content-ref url="../../../../compliance-and-risk-management/throttling-prevention" %}
[throttling-prevention](https://helpcenter.xopero.com/xopero-one-en/compliance-and-risk-management/throttling-prevention)
{% endcontent-ref %}
