All pages
Powered by GitBook
1 of 14

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Recovering groups

In this article, you will learn how to restore data from a GitLab group backup.

Recovery process

1

Get into the restore view using the following method:

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

  1. Search for the repository you want to restore, and click the Restore button in the action menu of that repository.

2

Next, select the backup plan from which you want to restore data. Click AVAILABLE PLANS 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

Choose the data you want to restore, or use the default settings.

5

In the next aside, click Edit next to Data to restore if you need to adjust it.

6

Next, select the destination where you want to restore the data.

7

In Restore settings you can set a custom name for the repository that will be created during the restore process and limit the internet bandwidth.

8

Choose the device that will be responsible for performing the restoration.

9

After defining all parameters, click the Restore button to begin the restore process. When the process is complete, a new repository will be created in your organization account.

There is no option to restore GitLab groups to other Git providers — they can only be restored between GitLab environments.

Cloud worker (cloud-installed GitProtect worker) allows you to perform cloud-to-cloud backups if you want to store your backups in the cloud.

Creating a backup plan

This article contains information on how to set up a GitLab repository 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 GitLab from the list, and then click Repos and metadata in the next aside.

3

Select (or add) the GitLab 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.


Optionally, GitProtect allows you to protect the entire GitLab 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

Rate limits

Rate limits are implemented to ensure the stability and security of the system, as excessive requests could overload or destabilize the application. For detailed information on GitLab rate limits, refer to .

the official GitLab documentation

Protected resources

This article provides information about protected resources, elements, and metadata in GitLab cloud and GitLab self-managed.

GitLab Protected Data

ANALYZE
BUILD
DEPLOY
ISSUE BOARDS
ISSUES
LABELS
MILESTONES
MONITOR
OPERATE
PROJECT SETTINGS
PULL REQUESTS
REPOSITORY
REQUIREMENTS
SNIPPETS

GitLab Groups Protected Data

ANALYZE
LABELS
MEMBERS
MILESTONES
POLICIES
PUSH RULES
SETTINGS
VARIABLES
WEBHOOKS
WIKI

{*} — restored as comments in format: [{creation date}] {user name}: {content}; the author of these restored comments will always be the account performing the restore task, not the original commenter.

Required permissions

Account

To log in to your account, GitProtect requires the following permissions:

  1. Access the authenticated user’s API — GitProtect needs read and write access to the API, including:

    1. All groups and projects.

    2. The container registry.

    3. The package registry.


The following permissions are the minimum needed to register the GitProtect application in your account and access repositories:

By creating a personal access token, you can assign different types of permissions. The following permissions allow you to back up the repository metadata in your organization:

  • read_api — required to assign an organization to GitLab.

  • api — grants full read/write access to the API, including all groups and projects.

  • read_repository — required to access the list of repositories and perform backups.

  • write_repository

— required to restore a repository.
  • read_registry — grants read access to Container Registry images when a project is private and authorization is required.

  • Personal Access Token (PAT)

    GitLab can be integrated with GitProtect using a personal access token not only for a regular GitLab user account but also for a service account that is a member of the project. The access requirements are the same as for a regular user account; however, the service account must also have at least the maintainer role.

    GitProtect supports legacy tokens; for proper system operation, it is recommended to use them instead of fine-grained tokens.

    With minimal privileges, some metadata (such as issues) may not be included in the backup. Select the necessary permissions based on the data you need to protect—if you grant only read permissions, backups can be performed, but restoring data will require a new token or password with write permissions.

    For more information about personal access tokens, visit the official GitLab website.

    Adding GitLab (cloud) organization to GitProtect

    This article explains how to add a GitLab (cloud) organization to the GitProtect platform to protect repositories or restore existing backups.

    Using OAuth

    1

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

    2

    Click the Connect button under GitLab.

    3

    , log in with a user account which has the required permissions for the repositories or projects to protect. If your GitLab login session is active in a different tab, the login will complete automatically.

    4

    Grant GitProtect access to the specified resources (when prompted).

    5

    Your GitLab 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 GitLab from the list.

    2

    Click the advanced mode link under GitLab and GitLab Self-managed tiles.

    3

    1

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

    2

    Click the advanced mode link under GitLab and GitLab Self-managed 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.

    Single repository recovery

    In this article, you will find information on how to restore a single repository to a Git service or localhost.

    1

    Get into the restore view using one of the following methods:

    Method 1:

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

    Set your authentication method.

    1. In Authentication, select GitLab.

    2. For Connect using, choose OAuth App.

    3. Choose whether GitProtect should automatically add new repositories to your backup and whether it should include GitLab groups in the backup.

    4

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

    5

    In the window that pops-up, log in with a user account which has the required permissions for the repositories or projects to protect. If your GitLab login session is active in a different tab, the login will complete automatically.

    6

    Grant GitProtect access to the specified resources (when prompted).

    7

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

    Set your authentication method.

    1. In Authentication, select GitLab.

    2. For Connect using, choose Login and Personal Access Token.

    3. Enter your username or email.

    4. Add or select PAT from the Password Manager.

    5. Choose whether GitProtect should automatically add new repositories to your backup and whether it should include GitLab groups in the 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 GitLab organization and grant GitProtect access to the specified resources.

    Using OAuth (Advanced Mode)

    Using Personal Access Token (PAT)

    Additional browser permissions

    In the window that pops-up
    Mozilla pop-up allowance

    Search for the repository you want to restore, and click the Restore button in the action menu of that repository.

    Method 2:

    1. Open the Storages tab, and click the browse storage button in the storage action menu.

    1. Click the Device section — you will then see all repositories that have been backed up and sent to the selected storage. Select one of the available repositories to proceed.

    2

    Next, select the backup plan from which you want to restore data. Click View available plans 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.

    By default, the system restores the entire repository (all files, source code, etc.), while repository metadata is optional. GitProtect allows you to restore only selected metadata—each element can be included or excluded by toggling the switch next to it.

    4

    Select the destination for the restore process. You can choose one of the assigned organizations from any Git service or any device. After selecting the repository and the metadata you want to include, click the Restore selected or Restore all button to proceed.

    5

    In the next aside, click Edit next to Data to restore if you need to adjust it.

    6

    Next, select the destination where you want to restore the data.

    A. Restore to a Git organization

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

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

    In Restore settings you can set a custom name for the repository that will be created during the restore process and limit the internet bandwidth.

    You can enter a new repository name in one of the following formats:

    1. If you enter organization/name (e.g., xsupport/test), the repository will be restored with the chosen name in the specified organization. If the entered organization does not exist, the repository will be restored to the source organization.

    2. If you enter only the repository name (e.g., test) and the source organization is registered in GitProtect, the repository will be restored there. If the organization is not registered, the repository will be restored to your account.

    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

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

    7

    Choose the device that will be responsible for performing the restoration.

    8

    After defining all parameters, click the Restore button to begin the restore process. When the process is complete, a new repository will be created in your organization account.


    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

    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.

    B. Restore to a device

    To restore a repository to a local device, you must have a Git client installed on that device.

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

    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.

    If a repository already exists in the selected folder, you can choose to overwrite the existing data.

    Recovering multiple repositories

    In this article, you will learn how to restore multiple repositories to a Git service or localhost.

    Recovery process

    1

    Get into the restore view using the following method:

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

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

    2

    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.

    3

    Select the destination for the restore process. You can choose one of the assigned organizations from any Git service or any device.

    4

    Choose whether to include metadata in the backup.

    5

    Next, select the destination where you want to restore the data.

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

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

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

    6

    Choose the device that will be responsible for performing the restoration.

    7

    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.


    Select the destination device.

  • 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

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

    1. Additionally, in the Restore settings, you can limit bandwidth usage during the recovery process.

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

    B. Restore to a device

    To restore a repository to a local device, you must have a Git client installed on that device.

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

    Useful links and items

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

    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.

    If a repository already exists in the selected folder, you can choose to overwrite the existing data.

    GitLab

    Integration
    Backup
    Recovery
    Cover
    Cover
    Cover

    Recovery

    Cross-recovery for DevOps organizations
    Single repository recovery
    Recovering multiple repositories
    Wiki recovery for DevOps organizations
    Recovering groups
    Cover
    Cover
    Cover
    Cover
    Cover

    Creating a backup plan for a group

    In this article, you will find information about GitLab group backup in GitProtect.

    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 GitLab from the list, and then click Groups in the next aside.

    3

    Add or select the GitLab groups you want to add to your plan.

    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.


    Information about groups and subgroups is included in the backup by default.

    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

    Adding GitLab (self-managed) organization to GitProtect

    This article explains how to add a GitLab (self-managed) organization to GitProtect.

    Using Personal Access Token (PAT)

    1

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

    2

    Click the Connect button under GitLab Self-managed.

    3

    Set your authentication method.

    1. In Authentication, select GitLab Self-Managed.

    2. In Settings, enter your GitLab service IP address.

    3. Add or select PAT from the Password Manager.

    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 GitLab (self-managed) organization and grant GitProtect access to the specified resources.

    Choose whether GitProtect should automatically add new repositories to your backup and whether it should include GitLab groups in the backup.

    Integration

    Required permissions
    Rate limits
    Adding GitLab (cloud) organization to GitProtect
    Adding GitLab (self-managed) organization to GitProtect
    Cover
    Cover
    Cover
    Cover

    Backup

    Protected resources
    Creating a backup plan
    Creating a backup plan for a group
    Cover
    Cover
    Cover