Migrating to 3.71 on a docker-based installation

From what I can tell the 3.71.0 tag is the same as 3.71.0-java17-ubi and 3.71.0-ubi (see: https://hub.docker.com/r/sonatype/nexus3/tags?page=&page_size=&ordering=&name=3.71 and compare the digest codes).

That said you are correct - after this whole ordeal I’m also getting Duplicate key errors. :frowning:

Quick googling found this thread: Cannot upload after OrientDB to H2 migration: Unique index or primary key violation · Issue #449 · sonatype/nexus-public · GitHub
There seems to be a script there which solves the issue. I’m going to give it a go after breakfast. :wink: Also worth noting that the script author has also provided instructions a few responses further on how to execute this in a docker-based instance.

EDIT: The script from Github appears to work and seems to have fixed the issue.

Instructions for running the script when dealing with a dockerized Nexus:

  1. copy the script to an .sh file
  2. modify the script as needed to point to the docker-based location for NEXUS_DATA and the following NEXUS_BIN:
NEXUS_BIN=/opt/sonatype/nexus/
NEXUS_DATA=/nexus-data/db
  1. bind/mount the created .sh file to your Nexus container and run it by overriding the entrypoint parameter
  2. if all went well then remove the overridden entrypoint and remove the script bind to cleanup
  3. restart your Nexus container as normal
1 Like