We applied the database export method as well. During the export, the erroneous records were skipped automatically by the tool. The component database itself is smaller than the actual blob store, which meant we could easily copy it for test purposes. So we tried the method on a copy of the database and verified by running the CHECK DATABASE
command in the nexus orient console. Before the fix, a lot of stacktraces were showing, which were all gone after the fix.
So we set out applying the fix on the actual database, stopping the nexus service first of course.
java -jar /opt/nexus/nexus-3.29.2-02/lib/support/nexus-orient-console.jar
connect plocal:/opt/nexus/sonatype-work/nexus3/db/component/ admin admin
Reran CHECK DATABASE
to verify the issue is still present, which it was.
Executing:
export database component-export
drop database
create database plocal:/opt/nexus/sonatype-work/nexus3/db/component
import database component-export.json.gz
Reran CHECK DATABASE
which showed the issue resolved.
Started the nexus service and we are back in business.
Running for a day an a half now and still no reports on any issues so far.
Most important thing now is to never let it run out of disk space again.