Current location - Music Encyclopedia - Chinese History - Restore the warehouse from gitlab backup package
Restore the warehouse from gitlab backup package
Demand scenario:

The data of a warehouse was lost and forcibly overwritten, which caused the historical submission to be unrecoverable. Just want to restore specific individual warehouses.

Key steps:

1. get the backup package of gitlab service, such as once a day, and restore it to the day you want, before the rollover. Unzip the backup package, enter the warehouse backup directory @hashed, and see that many folder names are the same garbled.

2. Go back to gitlab and check the project id of the project you want to restore. The garbled code above is actually a hash code. Just find an online tool or linux command sha256sum, and you can get the hash name of this warehouse.

3. Find the corresponding hash name in the unzipped directory mentioned above, and find that there is a bundled file and an empty directory below. Only the package file git clone is needed to restore the backed-up project.

The following is to resubmit git according to your own needs and so on.