# 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://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-a93b1f255b4ff13affee427d207be119fe308e28%2Fimage.png?alt=media" 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://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-f5da34e2b8f782851db1df8a866c94369efaa67b%2Fimage%20(1087).png?alt=media" 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 %}
In the **Data to restore** section, you can use the switch to include or exclude metadata in the backup.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-b3f0a09fb315db782dfc051890224c3ca03cfb9c%2Fimage%20(1088).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

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

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-012546729b5bb4a8abdc52138601ed15ee423747%2Fimage%20(1078).png?alt=media" 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 **GitProtect** also supports [cross-recovery](https://helpcenter.gitprotect.io/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://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-a566a7c1f21d3d1dac6bb7576e7cebef67a0053d%2Fimage%20(1079).png?alt=media" 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://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-724c00f1a0067c2c18491fc4ddae2342e2f27313%2Fimage%20(1080).png?alt=media" 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 **GitProtect 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 %}
Choose the device that will be responsible for performing the restoration.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2FiDucvUvXsoabwyfuKh1r%2Fimage.png?alt=media&#x26;token=fef4dc02-2be2-4276-9e43-138518bdfe19" alt=""><figcaption></figcaption></figure>
{% endstep %}

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

***

## Useful links and items

{% content-ref url="../../../../deployment-and-configuration/gitprotect-worker" %}
[gitprotect-worker](https://helpcenter.gitprotect.io/deployment-and-configuration/gitprotect-worker)
{% endcontent-ref %}

{% content-ref url="../../general/cross-recovery-for-devops-organizations" %}
[cross-recovery-for-devops-organizations](https://helpcenter.gitprotect.io/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.gitprotect.io/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.gitprotect.io/backup-and-recovery/devops/general/wiki-recovery-for-devops-organizations)
{% endcontent-ref %}

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