Determine Your Nexus 3 Data Directory From Install Files
Go to the install directory of Nexus created using the Nexus Installer program.
It should contain a directory ./bin/nexus.vmoptions. Inside the file look for the line containing -Dkaraf.data=
. The value of this property is the Nexus data directory.
If the value is a relative path, then it is relative to the install directory, not the ./bin directory containing the vmoptions file.
Determine Your Nexus 3 Data Directory From Log Files
Use grep or another tool to look for log lines inside nexus.log files.
zgrep 'karaf.data' sonatype-work/nexus3/log/nexus*
The following sample log line reports where the data directory is located based on karaf.data property value:
2020-05-06 14:26:55,419-0300 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.data='/Users/example/app/nexus-installer-3.23.0-03-mac-archive/sonatype-work/nexus3'
Determine Your Nexus 3 Data Directory From the Command Line
If Nexus is running, you can print the command line that started nexus from your active process list to determine your data directory.
ps -ef | grep NexusMain 20347 ttys000 0:25.28 /app/nexus3/nexus-3.0.0-b2016011501/.install4j/jre.bundle/Contents/Home/jre/bin/java -server -Dinstall4j.jvmDir=/app/nexus3/nexus-3.0.0-b2016011501/.install4j/jre.bundle/Contents/Home/jre -Dexe4j.moduleName=/app/nexus3/nexus-3.0.0-b2016011501/bin/nexus -Dinstall4j.launcherId=245 -Dinstall4j.swt=false -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Xms1200M -Xmx1200M -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Djava.net.preferIPv4Stack=true -Dkaraf.home=. -Dkaraf.base=. -Dkaraf.etc=etc -Djava.util.logging.config.file=etc/java.util.logging.properties -Dkaraf.data=/app/nexus3/data -Djava.io.tmpdir=/app/nexus3/data/tmp -Dkaraf.startLocalConsole=false -Di4j.vpt=true -classpath /app/nexus3/nexus-3.0.0-b2016011501/.install4j/i4jruntime.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/nexus-main.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/org.apache.karaf.main-4.0.4.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/org.osgi.core-6.0.0.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/org.apache.karaf.diagnostic.boot-4.0.4.jar:/app/nexus3/nexus-3.0.0-b2016011501/lib/boot/org.apache.karaf.jaas.boot-4.0.4.jar com.install4j.runtime.launcher.UnixLauncher run 9d17dc87 org.sonatype.nexus.karaf.NexusMain
Look for the value of karaf.data
. In the above example output we can see -Dkaraf.data=/app/nexus3/data
so the location of the data directory is /app/nexus3/data
.
Determine Your Nexus 3 Data Directory From the UI
Signin to Nexus as an Administrator. Navigate to Support -> System information. Find the section titled nexus-configuration. The value of the workingDirectory attribute is your data directory.
0 Comments