Code Snippet

Just another Code Snippet site

[Nexus] How-to

Start a container with Nexus volume, without starting Nexus OSS :

docker run -it -v /path/to/data:/nexus-data -v /path/to/ssl:/opt/sonatype/nexus/etc/ssl bradbeck/nexus-https bash

Start OrientDB console :

java -jar ./lib/support/nexus-orient-console.jar

or

java -cp $(find system/ -type f -name '*.jar' | tr '\n' ':') com.orientechnologies.orient.console.OConsoleDatabaseApp

Connect to DB :

connect plocal:/opt/sonatype/sonatype-work/nexus3/db/DB_NAME admin admin

Try to repair database :

REBUILD INDEX *
REPAIR DATABASE --fix-graph
REPAIR DATABASE --fix-links
REPAIR DATABASE --fix-ridbags
REPAIR DATABASE --fix-bonsai
DISCONNECT

Restore database from backup :

  • Stop Nexus Repository Manager
  • Remove the following directories from $data-dir/db
    • accesslog
    • analytics
    • audit
    • component
    • config
    • security
  • Go to the location where you stored the exported databases
  • Copy the corresponding .bak files to $data-dir/restore-from-backup for restoration (Note: For version 3.10.0 or earlier use $data-dir/backup as the restore location).
  • Restart Nexus Repository Manager

, ,


One thought on “[Nexus] How-to

Leave a Reply to Olivier Cancel reply

Your email address will not be published. Required fields are marked *