Recovery Of A Single Repository To Git Service Or GitProtect Worker
In this article, you will get information on how to restore a single repository to git service or GitProtect worker.
Get into the restore view
GitProtect has two options to open the restore view, both of which have been described below.
Use Git organization
Open the GitHub tab and then click on the Manage & Restore button next to the organization where 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.
Browse the storage
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 store. Choose one of the available repositories to proceed.
Select the backup plan
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.
Backup version
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.
Select 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, which consists of the wiki, issues, collaborators, and LFS.
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 GitHub you can restore only Wiki.
Select the destination
Restoring the whole repository
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:
Data to restore
Which was available in the previous step, but you can still edit it.
Restore to
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.
Restore settings
Restore to Git Organization 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 your account.
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 GitProtect worker To restore the repository to the localhost - any device - 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 that 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 it into the Path variable.
In the next step, Restore the directory, and select the directory, to where the data should be restored to.
If the repository already exists in this folder, you can also overwrite the existing data.
Device used to restore the 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.
You have to know that closed / merged Pull Requests are recovered as closed issues.
Last updated