Disclaimer… the following instructions use an implementation detail of the current blob store. As such, they are not officially supported, and they won’t work if the implementation changes.
Associated with each blob in the blob store there is a properties file. So for instance A particular blob file will consist of two files:
fac5e64d-831b-4b58-98c9-3dd0e4bd1b59.bytes
fac5e64d-831b-4b58-98c9-3dd0e4bd1b59.properties
Within the properties files you’ll see content like this:
#2018-08-22 08:33:33,965-0500
#Wed Aug 22 08:33:33 CDT 2018
@BlobStore.created-by=admin
size=40
@Bucket.repo-name=maven-releases
creationTime=1534944813965
@BlobStore.created-by-ip=127.0.0.1
@BlobStore.content-type=text/plain
@BlobStore.blob-name=org/foo/bar/project/1.2.3/project-1.2.3.jar
sha1=30d7edff3bc3f5e601be9529460b7bd573b1a8b7
deleted=true
The “@Bucket.repo-name” property shows which repository the blob is associated with. The “deleted=true” indicates the blob is in soft deleted state.
To restore the soft deleted file, locate the properties file and remove the “deleted=true” line. Then schedule and run a “repair: reconcile component database from blobstore” task.
There are some limitations associated with the reconcile task, see here for details:
https://help.sonatype.com/display/NXRM3/System+Configuration