How to restore a deleted component from trash of a Maven repository

You will find the deleted artifact files insonatype-work/nexus/storage/<repo-id>/.nexus/trash

You will find the matching attributes for the files undersonatype-work/nexus/storage/<repo-id>/.nexus/trash/.nexus/attributes

Restoring the attributes files is optional. They will be created again for any artifact that is missing them, however in the case of hosted repos, you will lose contextual information like when they were deployed and by who, if you do not restore them. Some people are not concerned with that level of detail.

To restore, copy the trashed files to the matching path undersonatype-work/nexus/storage/<repo-id>/.

A reindex task should be run to update the search indexes once the files are restored. A rebuild metadata task should also be run in the case of Maven repositories. You can run both of these tasks at the directory level of the paths you restored, by using Browse Storage and right-clicking on the highest common parent node in the tree.

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk