Nexus

### Docker

$ docker exec -u root -it docker-nexus3-nexus-1 /bin/bash $ docker logs docker-nexus3-nexus-1

### Console / Connect database

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar && chown -R nexus:nexus /nexus-data/db $ connect plocal:/nexus-data/db/component admin admin $ connect plocal:/nexus-data/db/config admin admin $ connect plocal:/nexus-data/db/security admin admin

### Passord reset

$ connect plocal:/nexus-data/db/security admin admin $ update user SET password="$shiro1$SHA-512$1024$NE+wqQq/TmjZMvfI7ENh/g==$V4yPw8T64UQ6GfJfxYq2hLsVrBY8D1v+bktfOxGdt4b/9BthpWPNUy/CBk6V9iA0nHpzYzJFWO8v/tZFtES8CA==" UPSERT WHERE id="admin" $ exit

### Repair database component/config/security

#### Database config

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar $ connect plocal:/nexus-data/db/config admin admin $ REBUILD INDEX * $ REPAIR DATABASE --fix-graph $ REPAIR DATABASE --fix-links $ REPAIR DATABASE --fix-ridbags $ REPAIR DATABASE --fix-bonsai $ REPAIR DATABASE config $ DISCONNECT $ exit

#### Database component

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar $ connect plocal:/nexus-data/db/component admin admin $ REBUILD INDEX * $ REPAIR DATABASE --fix-graph $ REPAIR DATABASE --fix-links $ REPAIR DATABASE --fix-ridbags $ REPAIR DATABASE --fix-bonsai $ REPAIR DATABASE component $ DISCONNECT $ exit

#### Database security

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar $ connect plocal:/nexus-data/db/security admin admin $ REBUILD INDEX * $ REPAIR DATABASE --fix-graph $ REPAIR DATABASE --fix-links $ REPAIR DATABASE --fix-ridbags $ REPAIR DATABASE --fix-bonsai $ REPAIR DATABASE security $ DISCONNECT $ exit
Nexus is insufficient, and some ".wal" files are created in folder "/nexus-data/db/config". After deleting them, everything is restored.

### Repaire database component

$ REBUILD INDEX * $ export database component-export $ drop database $ CREATE DATABASE PLOCAL:/nexus-data/db/component $ import database component-export.json.gz $ REBUILD INDEX * $ REPAIR DATABASE --fix-graph $ REPAIR DATABASE --fix-links $ REPAIR DATABASE --fix-ridbags $ REPAIR DATABASE --fix-bonsai $ DISCONNECT

###

$ cd /tmp && java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar && chown -R nexus:nexus /nexus-data/db $ connect plocal:/nexus-data/db/config admin admin orientdb {db=config}> select from upgrade_model_versions

### The record can be deleted as follows

$ load record $ truncate record $ rebuild index asset_bucket_component_name_idx $ REPAIR DATABASE component $ DISCONNECT $ exit
$ drop class quartz_trigger $ REPAIR DATABASE component $ DISCONNECT $ exit
$ load record $ truncate record $ rebuild index asset_bucket_component_name_idx $ REPAIR DATABASE component