Recovery Of A Single Repository To Git Service Or GitProtect Worker
In this article, you will get information on how to restore single repository to git service or GitProtect worker.
Last updated
In this article, you will get information on how to restore single repository to git service or GitProtect worker.
Last updated
GitProtect has two options to open the restore view, both of them have been described below.
Open the Bitbucket tab and then click on the Manage & Restore button next to the organization that you want to restore the backup.
In the next step search for the repository that you want to restore and select the Restore button available on the action menu for each repository.
To perform the restore process starting with browsing the storage open the Storages tab and click the Browse storage button visible on the storage action menu.
After opening the restore window click on the Device section. After doing so, you'll be able to see every repository that has been backed up and sent to the selected storage. Choose one of the available repositories to proceed.
So the first step after getting into the restore window is to select the backup plan that we want to restore the data. Click on Backup plans and choose one of the available plans from the list.
After doing so, head to the Backup copies section.
This section gives you the possibility to choose the backup version between all the backups that have been already performed.
Choose the desired date and click on the Restore button, which will display another window, where you can choose data to restore.
By default, the system restores the whole repository (all the files included in it, the source code, etc.), but the metadata of the repository is optional. GitProtect allows you to choose only part of the metadata.
Each element can be included/excluded by turning on/off the switch next to it. There's one more additional option below all these, namely Wiki recovery. If you have your repository already available on Bitbucket you can restore only Wiki.
That allows you to select the destination of the restore process. At this moment it gives you the possibility to select one of the assigned organizations of any Git service or any device.
After choosing the repository and the metadata that you want to include during the restore process click on the Restore selected button or Restore all button, which will open another aside called Restore data.
It consists of 4 sections:
Which was available in the previous step, but you can still edit it.
Where you can set the custom name for a repository that will be created during the restore process. And reduce internet bandwidth.
It is possible to enter a new repository name in the following variants.
If you enter organization/name (eg adambijax/test) the repository will be restored with the chosen name to the indicated organization.
In the example given, it will be the test repository in the adambijax organization. If the organization name entered does not exist, the repository will be simply restored to the source organization.
If you enter only the name of the repository (e.g. test) and the organization from which the repository comes is registered in GitProtect, the repository will be restored there. If the organization is not registered, the repository will simply be restored to your account.
When you enter the name of a repository that already exists in your organization, the restore will fail.
Restoring will never overwrite existing repositories in the organization. If you do not choose the repository name, the restored repository will have its original name with an automatically generated suffix. Restore to localhost - GitProtect worker To restore the repository to the localhost - any GitProtect worker - select the Device option, and next the destination device.
To restore the repository to the local device you have to have a local Git client installed on this device.
You can restore only the repository (without metadata) if you restore the data to the local resources!
Make sure, that the device, to which you want to restore data to has GitProtect worker installed and the Git client is added to the Path environment variable. The Path variable should be configured automatically after the Git installation (system restart may be required), but if it isn't, set it as the path to the git.exe file: C:\Program Files\Git\bin\git.exe To configure the Path variable, go to the environment variables, select the Path variable and hit the Edit button. Now copy the git.exe file path and paste into the Path variable. See more:
In the next step, Restore directory, select the directory, to where the data should be restored to.
If the repository already exist in these folder, you can also overwrite the existing data.
The last section, gives the possibility to choose the device, that will be responsible for performing the restoration.
After defining all these parameters click Start now button, which will run the restore process.
After defining all these parameters click Start now button, which will run the restore process. When the restore process will be over, a new repository will be created in your organization account.