Today, when finishing the company's Maven, accidentally deleted the release library. A cold sweat came out of the moment! All the accumulation of the company, Ah, the first way to flash in the mind is to see if there is a recycle Bin, just in the Nexus UI saw a call trash ... The function. But I click to find only empty trash function, this must press down still got AH.
Finally in the Sonatype Nexus official search to an article, the original text is as follows:
When you delete a repository from the Nexus UI, Nexus would remove the repository from any groups it belongs too and move T He repository contents to it ' s trash folder. Sometimes you'll want to the restore this repository back into service.
To restore a deleted repository with ID of ' releases ':
1. MV Sonatype-work/nexus/trash/releases Sonatype-work/storage So, end up with sonatype-work/storage/releases
2. Recreate the repository with the same repository ID ' releases ' Using the Repositories tab user interface.
3. Add the repository to any groups that it is in before.
The act of creating the repository in the UI would force a reindex of the previous repository storage contents.
Fortunately! Found a way to recover deleted files. Finally, all data under the deleted release library was successfully restored in accordance with the official approach. The procedure is as follows:
First Find Sonatype-work/nexus/tra sh under Find you delete the library and save it to another place;
Then click Add via the Nexus console, select hosted Repository, and enter the deleted Repository information;
Copy the library file you just saved to the specified sonatype-work/nexus/storage/[releases].
Click Public repositories in the list and add releases to ordered Group repositories under the Configuration tab below.
The last save will be saved.
Sonatype Nexus Library Deleted recovery method