All pages
Powered by GitBook
1 of 11

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Bitbucket

Cover
Integration
Cover
Backup
Cover
Recovery

Integration

Cover
Required permissions
Cover
API limits
Cover
Adding Bitbucket organization to GitProtect

API limits

Rate limits are enforced for security and stability— excessive requests may block access or disrupt the application’s operation. For detailed information, refer to the official Bitbucket documentation.

Backup

Cover
Protected resources
Cover
Creating a backup plan

Recovery

Overview of Bitbucket data recovery in GitProtect, including restoration of repositories, wikis, and related metadata.

Cover
Cross-recovery for DevOps organizations

How GitProtect restores repositories and metadata across Git providers for rapid disaster recovery and DevOps migrations.

Cover
Single repository recovery

How to restore a single Bitbucket repository backup copy to a Git service or to localhost.

Cover
Recovering multiple repositories

Restore multiple Bitbucket repository backup copies at once to a local device or to any Git service integrated with GitProtect.

Cover
Wiki recovery for DevOps organizations

How to restore a DevOps organization wiki and its metadata separately.

Creating a backup plan

This article provides instructions on how to set up a Bitbucket backup plan.

Backup plan setup

1

Login to GitProtect Management Service, open the Plans > Backup tab and click the Add plan button in the top bar.

2

Select Bitbucket from the list.

3

Select (or add) the Bitbucket environment you want to include in the backup process, and choose the repositories to back up.

4

Specify a name for the backup plan.

5

Select the appropriate metadata that you want to back up. Here, you can also change the default worker, which is the device directly responsible for the backup process of your repositories.

6

Select one of the locations assigned to your GitProtect instance as storage.

7

Customize the scheduler and specify how long your data should be retained. If needed, adjust the advanced settings to suit your needs.

8

If necessary, adjust the advanced settings such as encryption, error handling, or bandwidth limits to fit your requirements.

9

Double-check your data and click Save to create the backup plan.


Required permissions

Permissions required to integrate Bitbucket with GitProtect to protect its resources.

To protect a Bitbucket environment with GitProtect, the account or token used to authorize the connection must have sufficient permissions to access the workspaces, repositories, and related resources designated for backup. The specific permission scopes vary depending on the chosen authorization method.


When integrating Bitbucket using the OAuth authentication method, GitProtect requires the following permissions to securely access and protect your repository data:

Recovering multiple repositories

Restore multiple Bitbucket repository backup copies at once to a local device or to any Git service integrated with GitProtect.

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.


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

1

Get into the restore view using the following method:

  1. Open the Bitbucket tab (

Optionally, GitProtect allows you to protect the entire Bitbucket environment.

You can have multiple workers and assign different workers to each backup plan.

It is worth noting that the cloud worker (a cloud-installed GitProtect worker) allows you to perform cloud-to-cloud backups if you want to store your backups in the cloud.

Useful links and items

Cloud storage
Scheduler & retention

Issues


  • Every API token created for Bitbucket integration with GitProtect requires specific permission scopes to restrict data access and define the exact operations the token can execute.

    To ensure successful backup and recovery tasks, API token must be provisioned with the below required permissions.


    OAuth permissions

    Bitbucket API token scopes

    GitProtect does not support unscoped API tokens for Bitbucket integrations.

    Applying minimal privileges may cause certain metadata (such as issues) to be omitted from the backup. Furthermore, while read-only permissions are sufficient for running backups, restoring data requires write access, which will necessitate generating a new token with elevated privileges during a recovery operation. To prevent backup omissions and ensure seamless, immediate data recovery, it is strongly recommended to select all required permissions when creating an API token for Bitbucket.

    Backup permission scopes

    Restore permission scopes

    Useful links and items

    DevOps
    >
    Bitbucket
    ), then click the
    Explore
    button next to the organization whose backup you want to restore (explore
    icon in list view).
  • Select all repositories you want to restore and click Restore in the top menu.

  • 2

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

    By default, the latest backup is always selected, regardless of the plan.

    3

    Select the destination for the recovery and click Next.

    You can choose any device or organization registered in GitProtect (you can find more information about cross-recovery in Useful links and items section).

    4

    In Data to restore section at the top, click Edit and select data you want to restore.

    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.

    If an item cannot be restored to the selected Git platform, it will be marked with an orange dot.

    5

    In the Throttling prevention section, you can add additional DevOps organization accounts to avoid throttling.

    To use additional organization accounts, you must first add them in the organization settings (organization view > Edit).

    6

    Configure the recovery destination settings, depending on where the backup will be restored.

    Restore to a Git organization

    1. In Map organizations section, select the target organizations where the repositories will be restored.

    If the recovery destination is Azure DevOps, the Map organizations section will be replaced by Target organization and Target project settings.

    1. In Restore settings, you can set custom names for all repositories or add a suffix to the original repository names.

    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.

    1. Adjust the bandwidth and other available settings, depending on the recovery destination.

    2. Check which worker is set as the default for recovery and change it if necessary.

    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.

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

    7

    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.


    Recovery process

    Useful links and items

    GitProtect worker
    Cross-recovery for DevOps organizations
    LFS recovery for DevOps organizations
    Wiki recovery for DevOps organizations
    Throttling prevention

    Single repository recovery

    How to restore a single Bitbucket repository backup copy to a Git service or to localhost.

    Single repository recovery for Bitbucket enables restoration of an individual repository together with its complete Git history, branches, tags, and associated metadata, without impacting other projects or repositories within the workspace.


    Recovery process

    The below steps demonstrate how to quickly restore a single Bitbucket repository using GitProtect Management Service.

    1

    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 icon in list view).

    2. Search for the repository you want to restore, then click the restore icon in the action menu of that repository.

    2

    Select the backup plan from which you want to restore data. Click the drop-down under Backup plans section and choose one of the plans from the list.

    3

    Choose the backup version from all the backups that have already been performed — select the desired date and click the Restore button.

    4

    Select the data available to restore and click Restore selected or Restore all to proceed.

    5

    Select the destination for the recovery and click Next.

    6

    In the Data to restore section at the top, you can select which of the previously chosen available data you want to restore.

    7

    In the Restore to section, you can change the previously selected recovery destination if needed.

    8

    In the Throttling prevention section, you can add additional DevOps organization accounts to avoid throttling.

    9

    Configure the recovery destination settings, depending on where the backup will be restored.

    1. In Map organizations section, select the target organization to which the repository will be restored.

    1. In Restore settings, you can set a unique, custom name for the repository (or use the custom name automatically generated by GitProtect).

    10

    After defining all parameters, click the Restore button to begin the recovery process. When the process is complete, a new repository/folder will be created in your organization/on your device. You can monitor the restoration process in the Tasks tab.


    Adding Bitbucket organization to GitProtect

    This article provides instructions for adding a Bitbucket organization to GitProtect.

    Using OAuth

    1

    Log in to GitProtect Management Service, open the DevOps tab on the left side of the window, and select Bitbucket from the list.

    2

    Click the Connect button under Bitbucket.

    3

    A pop-up with Bitbucket login page will appear. Log in using your admin credentials and grant GitProtect access to the specified resources (when prompted).

    4

    Your Bitbucket organization has now been successfully added to GitProtect. Click Custom policy to adjust your backup policy settings, or click Run backup to execute the backup immediately using the current policy configuration.


    1

    Log in to GitProtect Management Service, open the DevOps tab on the left side of the window, and select Bitbucket from the list.

    2

    Click the advanced mode link under Bitbucket and Bitbucket DC tiles.

    3


    1

    Log in to GitProtect Management Service, open the DevOps tab on the left side of the window, and select Bitbucket from the list.

    2

    Click the advanced mode link under Bitbucket and Bitbucket DC tiles.

    3


    When adding an organization, you may be prompted to grant additional permissions to the GitProtect application—make sure your browser allows GitProtect to open pop-up windows.

    Depending on your browser, you can either adjust the settings to allow pop-ups or permit the authorization window to open once.


    Restore to a device

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

    You can restore only the repository (without metadata) when restoring data to local resources.

    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.

    If you are restoring your repository to a different Git organization than the original (for example, GitHub), in addition to setting a custom name, you can choose whether to add a label to the restored elements and whether to enable pipelines (where applicable).

  • Check which agent is set as the default for recovery and change it if necessary.

  • If needed, you can also adjust the bandwidth.

    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.

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

    You can choose any device or organization registered in GitProtect (you can find more information about cross-recovery in Useful links and items section).

    GitProtect allows you to select specific metadata to restore — each element can be included or excluded by toggling the switch next to it.

    If an item cannot be restored to the selected Git platform, it will be marked with an orange dot.

    To use additional organization accounts, you must first add them in the organization settings (organization view > Edit).

    Restore to a Git organization

    If the recovery destination is Azure DevOps, the Map organizations section will be replaced by Target organization and Target project settings.

    Restoring never overwrites existing repositories in the organization — if you do not set a new name for the restored repository, it keeps its original name with an automatically generated suffix.

    When you set a custom name for the repository, and a repository with that name already exists in the specified organization, the recovery will fail.

    Useful links and items

    GitProtect worker
    Cross-recovery for DevOps organizations
    LFS recovery for DevOps organizations
    Wiki recovery for DevOps organizations
    Throttling prevention

    Restore to a device

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

    You can restore only the repository (without metadata) when restoring data to local resources.

    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.

    Set your authentication method.
    1. In Authentication, select Bitbucket.

    2. For Connect using, choose OAuth App.

    3. In the Settings section, choose whether to enable read-only mode and whether GitProtect should automatically add new repositories to your backup.

    4

    Configure your repository sync and default worker. Specify hours for synchronization, or set a time interval for automatic updates.

    5

    Click Proceed to complete adding your Bitbucket organization and grant GitProtect access to the specified resources (when prompted).

    Set your authentication method.
    1. In Authentication, select Bitbucket.

    2. For Connect using, choose Username and App password.

    3. Enter your Bitbucket email address.

    4. Add or select App Password that contains your API token from the Password Manager.

    5. Choose whether GitProtect should automatically add new repositories to your backup.

    4

    Configure your repository sync and default worker. Specify hours for synchronization, or set a time interval for automatic updates.

    5

    Click Proceed to complete adding your Bitbucket organization and grant GitProtect access to the specified resources.

    Using OAuth (Advanced Mode)

    Using an API token

    Additional browser permissions

    Useful links and items

    Mozilla pop-up allowance

    If the Read-Only Access switch is enabled, the recovery options will be disabled.

    Create an API token | Bitbucket Cloud | Atlassian SupportAtlassian Support
    API tokens | Bitbucket Cloud | Atlassian SupportAtlassian Support
    Logo
    Logo

    Protected resources

    Overview of protected Bitbucket resources, including repositories, wikis, and metadata secured by backup.

    Bitbucket protected resources define which parts of your environment GitProtect can access, secure, and restore.


    The following list includes all Bitbucket resources covered by backup.

    Backup coverage

    The list is presented in alphabetical order.

    ACCESS KEYS
    BRANCHING MODEL
    BRANCH RESTRICTIONS
    DOWNLOADS
    ISSUES
    PIPELINES
    PULL REQUESTS
    REPOSITORY
    WEBHOOKS
  • Project