# Recovering multiple repositories

**GitProtect enables multiple Bitbucket repositories recovery, allowing administrators to restore several repositories simultaneously within a selected organization or project scope. The process preserves Git history, branches, tags, and supported metadata, ensuring data integrity and consistency across the restored resources.**

***

## Recovery process

The below steps demonstrate how to restore multiple **Bitbucket** repositories at once using **GitProtect Management Service**.

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

1. Open the **Bitbucket** tab (**DevOps** > **Bitbucket**), then click the **Explore** button next to the organization whose backup you want to restore (explore ![](https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2FlznOQewoKxgR6fVymPw3%2Fimage.png?alt=media\&token=ae42e612-0146-41f9-a50f-6977b4a70609) icon in list view).
2. Select all repositories you want to restore and click **Restore** in the top menu.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2FZjGDbl5U7IqRQairugZC%2Fimage.png?alt=media&#x26;token=e49a31b0-40a2-43c4-a89f-21215cba03df" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click every chosen repository to select the backup plan and copy from which you want to restore data, then click **Next**.

{% hint style="info" %}
By default, the latest backup is always selected, regardless of the plan.
{% endhint %}
{% endstep %}

{% step %}
Select the destination for the recovery and click **Next**.

{% hint style="info" %}
You can choose any device or organization registered in **GitProtect** (you can find more information about cross-recovery in **Useful links and items section**).
{% endhint %}

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2FF7BOVNI8LzOI4XUjqASO%2Fimage.png?alt=media&#x26;token=90952005-50d3-443d-a49a-526b0f9f1b25" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
In **Data to restore** section at the top, click **Edit** and select data you want to restore.

{% hint style="success" %}
By default, all items are selected for restoration. However, **GitProtect** allows you to choose which metadata to restore. You can include or exclude each element by toggling the switch next to it.
{% endhint %}

{% hint style="warning" %}
If an item cannot be restored to the selected **Git** platform, it will be marked with an orange dot.
{% endhint %}

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fby0hmcMSBhTdQ11xrpqc%2Fimage.png?alt=media&#x26;token=06fb10c6-2903-4e7b-a784-c8459512f2c7" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
In the **Throttling prevention** section, you can add additional **DevOps** organization accounts to avoid throttling.

{% hint style="warning" %}
To use additional organization accounts, you must first add them in the organization settings (organization view > **Edit**).
{% endhint %}

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2F7v0RhO1PAQ8aWXmo2d29%2Fimage.png?alt=media&#x26;token=79098100-51e4-413a-bd36-fe4fbc036498" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Configure the recovery destination settings, depending on where the backup will be restored.

#### Restore to a Git organization:

1. Select the target organization, then select or create a new project (where applicable).
2. In **Restore settings**, you can set custom names for all repositories or add a suffix to the original repository names.

{% hint style="danger" %}
Restoration will never overwrite existing repositories. If you enter a custom name—or leave the name as default—and a repository with that name already exists in your organization, **the recovery will fail**. To ensure successful recovery, either provide a unique name or select **Add suffix to repo name** to automatically append a unique identifier to the original repository name.
{% endhint %}

3. Adjust the bandwidth and other available settings, depending on the recovery destination.
4. Check which worker is set as the default for recovery and change it if necessary.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Ff4PIZookorCe6LMq95hl%2Fimage.png?alt=media&#x26;token=325feb7a-7e82-46f7-b6f4-fa4d1f34256e" alt=""><figcaption></figcaption></figure>

#### Restore to a device:

{% hint style="warning" %}
To restore a repository to a local device, you must have a **Git** client and the **GitProtect** worker installed on that device (you can find more information about workers in **Useful links and items** section).
{% endhint %}

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

1. Select the destination device (a registered device).
2. Make sure the device where you want to restore data has 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, you will have to configure it manually.

{% hint style="info" %}
To configure the PATH variable in **Windows**, 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. Specify the restoration directory and configure other options (for example, whether to overwrite existing data or reduce bandwidth). If needed, you can create a new restoration folder on the selected drive from the **Management Service** level.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fhcyich6eQd62Ruc2ZEXY%2Fimage.png?alt=media&#x26;token=732b22f5-ecc4-4475-aeb7-1ccd3c0e9854" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
After defining all parameters, click the **Restore** button to begin the recovery process. When the process is complete, a new project/repository/folder will be created in your organization/on your device. You can monitor the restoration process in the **Tasks** tab.
{% 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 %}
