2

We have a nexus 3.12.1 and its daily storing hundreds of artifacts which are build from Jenkins. The problem is there are too many files present in blob store are not showing in Nexus Console. Actually we don't want these files but that is filling up too much disk space. We ran all cleanup tasks on all of the repositories, but it is not cleaning the artifacts present in blob-store.

So our approach is to first run the task "Repair - Reconcile component database from blob store job" and then "Remove snapshots from Maven repository"

We have dry run the task "Repair - Reconcile component database from blob store job". The output of the log files is of 105079 lines, took ~15 min and we got only 2 warnings (no errors).

cat blobstore.rebuildComponentDB-20190823042827074.log | grep -v INFO
2019-08-23 04:33:04,902+0000 WARN  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.maven.internal.MavenRestoreBlobStrategy - Skipping as no maven coordinates found and is not maven metadata
2019-08-23 04:33:39,633+0000 WARN  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.maven.internal.MavenRestoreBlobStrategy - Skipping as no maven coordinates found and is not maven metadata

And summery logs are as below:

.......<truncated text>........
2019-08-23 04:37:43,653+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.maven.internal.MavenRestoreBlobStrategy - ::DRY RUN:: Restored asset, blob store: default, repository: snapshots, path: com/CMP/MODULE/FUNCTION/ui/MODULE-FUNCTION-ui/2.14.2-SNAPSHOT/MODULE-FUNCTION-ui-2.14.2-20190502.152829-43.pom.md5, blob name: com/CMP/MODULE/FUNCTION/ui/MODULE-FUNCTION-ui/2.14.2-SNAPSHOT/MODULE-FUNCTION-ui-2.14.2-20190502.152829-43.pom.md5, blob id: bf5327dd-e386-4fc4-a625-9da968e99f64
2019-08-23 04:37:43,666+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.RestoreMetadataTask - ::DRY RUN:: Elapsed time: 9.276 min, processed: 376782, un-deleted: 0
2019-08-23 04:37:43,675+0000 INFO  [quartz-5-thread-20]  *SYSTEM com.sonatype.nexus.blobstore.restore.internal.NugetIntegrityCheckStrategy - Checking integrity of assets in repository 'r1' with blob store 'special'
2019-08-23 04:37:43,676+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r2-repo' with blob store 'special'
2019-08-23 04:37:43,681+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 4.655 ms, processed: 8, failed integrity check: 0
2019-08-23 04:37:43,681+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r3-release' with blob store 'special'
2019-08-23 04:37:43,726+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 44.85 ms, processed: 49, failed integrity check: 0
2019-08-23 04:37:43,726+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'thirdparty-software' with blob store 'special'
2019-08-23 04:37:43,754+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 28.02 ms, processed: 45, failed integrity check: 0
2019-08-23 04:37:43,754+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r4-repo' with blob store 'special'
2019-08-23 04:37:43,755+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r5-snapshots' with blob store 'special'
2019-08-23 04:37:43,756+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'java.net' with blob store 'special'
2019-08-23 04:37:43,758+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 2.017 ms, processed: 2, failed integrity check: 0
2019-08-23 04:37:43,759+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r5-central' with blob store 'special'
2019-08-23 04:37:43,759+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'central' with blob store 'special'
2019-08-23 04:38:25,568+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 41.81 s, processed: 63965, failed integrity check: 0
2019-08-23 04:38:25,568+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r6-snapshots' with blob store 'special'
2019-08-23 04:38:25,728+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 159.6 ms, processed: 226, failed integrity check: 0
2019-08-23 04:38:25,728+0000 INFO  [quartz-5-thread-20]  *SYSTEM com.sonatype.nexus.blobstore.restore.internal.NugetIntegrityCheckStrategy - Checking integrity of assets in repository 'r7-hosted' with blob store 'special'
2019-08-23 04:38:25,730+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r4-release' with blob store 'special'
2019-08-23 04:38:25,731+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r8am' with blob store 'special'
2019-08-23 04:38:25,735+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 4.032 ms, processed: 2, failed integrity check: 0
2019-08-23 04:38:25,735+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r9-tech' with blob store 'special'
2019-08-23 04:38:26,495+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 760.0 ms, processed: 1112, failed integrity check: 0
2019-08-23 04:38:26,495+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r5-releases' with blob store 'special'
2019-08-23 04:38:26,496+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r10-snapshot-repository' with blob store 'special'
2019-08-23 04:38:26,583+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 86.39 ms, processed: 100, failed integrity check: 0
2019-08-23 04:38:26,583+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r11-json' with blob store 'special'
2019-08-23 04:38:26,587+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'thirdparty' with blob store 'special'
2019-08-23 04:38:29,632+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 3.045 s, processed: 2379, failed integrity check: 0
2019-08-23 04:38:29,632+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'releases' with blob store 'special'
2019-08-23 04:39:29,639+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 1.000 min, processed: 83253, failed integrity check: 0
2019-08-23 04:39:37,551+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 1.132 min, processed: 94146, failed integrity check: 0
2019-08-23 04:39:37,552+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'download.java.net' with blob store 'special'
2019-08-23 04:39:37,553+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'snapshots' with blob store 'special'
2019-08-23 04:40:37,554+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 1.000 min, processed: 83879, failed integrity check: 0
2019-08-23 04:40:42,787+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 1.087 min, processed: 90913, failed integrity check: 0
2019-08-23 04:40:42,787+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r12-repository' with blob store 'special'
2019-08-23 04:40:42,935+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 148.3 ms, processed: 180, failed integrity check: 0
2019-08-23 04:40:42,936+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r13-snapshots' with blob store 'special'
2019-08-23 04:40:42,944+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 8.752 ms, processed: 1, failed integrity check: 0
2019-08-23 04:40:42,945+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'r3-milestone' with blob store 'special'
2019-08-23 04:40:43,136+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Elapsed time: 190.9 ms, processed: 234, failed integrity check: 0
2019-08-23 04:40:43,136+0000 INFO  [quartz-5-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.restore.RestoreMetadataTask - Task complete

Actually I am new to nexus and I don't understand what it says.
eg. Elapsed time: 1.132 min, processed: 94146, failed integrity check: 0 : Will it restores 94146 files?
And looking into the logs above, is it safe to run this task? And will we need any downtime for this?

1
+50

And looking into the logs above, is it safe to run this task? And will we need any downtime for this?

I would suggest to backup all artifacts and upload them to a new Nexus (I created for this) as I have seen multiple errors in Nexus that did not give me enough confidence to just run some tasks.

Once we deployed a new Nexus and included it in our build environment for two weeks we knew that everything was still working well. Then we applied some jobs to the old decommissioned Nexus and it turned out that it was fine.

In summary, ensure that you have a another Nexus that is working well before executing tasks that could go wrong.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.