Nexus-db-migrator-3.70.4-02 for OrientDB backup doesn't produce any H2 file

I’m trying to migrate from a docker based sonatype/nexus3:3.70.2 image to H2 as described in Migrating to 3.71 on a docker-based installation - #5 by mbender

Nexus System Information:
version 3.70.2-01
edition OSS
nexus-db-feature nexus-orient

The backup I’ve created into a mounted volume looks resonable:

-r--r--r-- 1 21155377 Mrz 31 16:48 analytics-2025-03-31-14-48-08-3.70.2-01.bak
-r--r--r-- 1 42441936 Mrz 31 16:48 component-2025-03-31-14-48-08-3.70.2-01.bak
-r--r--r-- 1   258245 Mrz 31 16:48 config-2025-03-31-14-48-08-3.70.2-01.bak
-rw-r--r-- 1 56809625 Mrz 31 16:52 nexus-db-migrator-3.70.4-02.jar
-r--r--r-- 1   134371 Mrz 31 16:48 security-2025-03-31-14-48-08-3.70.2-01.bak

I’m then starting the migrator with Java11 on the docker host

java -Xmx16G -Xms16G -XX:+UseG1GC -XX:MaxDirectMemorySize=28672M -jar nexus-db-migrator-3.70.4-02.jar -migration_type=h2

working directory is the one with the *.bak files, but it doesn’t produce nexus.mv.db, or any other H" db file, neither is there any obvious error, except that it reports that 0 records were migrated:

17:24:30 [main] WARN  c.s.n.d.migrator.MigratorApplication - Please ensure any Nexus Repository instance has been gracefully shut down before proceeding.
17:24:30 [main] INFO  c.s.n.d.migrator.MigratorApplication - Do you want to continue [y/n]?
y
17:24:31 [main] INFO  c.s.n.d.migrator.MigratorApplication - --content_migration parameter is absent. Setting it to true.
17:24:31 [main] INFO  c.s.n.d.migrator.MigratorApplication - Force parameter wasn't found. Setting it to false by default.
17:24:31 [main] INFO  c.s.n.d.migrator.MigratorApplication - ------------------------------------------------------------
17:24:31 [main] INFO  c.s.n.d.migrator.MigratorApplication - Java version: Oracle Corporation 11.0.2
17:24:31 [main] INFO  c.s.n.d.migrator.MigratorApplication - JVM arguments: -Xmx16G -Xms16G -XX:+UseG1GC -XX:MaxDirectMemorySize=28672M
17:24:31 [main] INFO  c.s.n.d.migrator.MigratorApplication - Migrator arguments: -migration_type=h2 --content_migration=true --export_json=false --force=false
17:24:31 [main] INFO  c.s.n.d.migrator.MigratorApplication - ------------------------------------------------------------
17:24:32 [main] INFO  c.s.n.d.migrator.MigratorApplication - Starting MigratorApplication v3.70.4-02 using Java 11.0.2 on legolas with PID 36820 (C:\Temp\nexus\nexus-db-migrator-3.70.4-02.jar started by amueller in c:\Temp\nexus)
17:24:32 [main] INFO  c.s.n.d.migrator.MigratorApplication - No active profile set, falling back to 1 default profile: "default"
17:24:33 [main] INFO  o.s.j.d.e.EmbeddedDatabaseFactory - Starting embedded database: url='jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=false', username='sa'
17:24:34 [main] INFO  o.s.b.c.r.s.JobRepositoryFactoryBean - No database type set, using meta data indicating: H2
17:24:34 [main] INFO  c.s.n.d.migrator.MigratorApplication - Started MigratorApplication in 3.113 seconds (JVM running for 5.32)
17:24:34 [main] INFO  o.s.b.a.b.JobLauncherApplicationRunner - Running default command line with: [-migration_type=h2, --content_migration=true, --export_json=false, --force=false]
17:24:35 [main] INFO  c.s.n.d.m.l.ProvidingJobInfoListener - Migration job started at Mon Mar 31 17:24:35 CEST 2025
17:24:35 [main] INFO  o.s.batch.core.job.SimpleStepHandler - Executing step: [startHealthCheckDeciderStep]
17:24:35 [main] INFO  o.s.batch.core.step.AbstractStep - Step: [startHealthCheckDeciderStep] executed in 18ms
17:24:35 [main] INFO  o.s.batch.core.job.SimpleStepHandler - Executing step: [initDatabaseStep]
17:24:35 [main] INFO  o.s.batch.core.step.AbstractStep - Step: [initDatabaseStep] executed in 348ms
17:24:35 [main] INFO  c.s.n.d.m.l.ProvidingJobInfoListener - Migration job finished at Mon Mar 31 17:24:35 CEST 2025
17:24:35 [main] INFO  c.s.n.d.m.l.ProvidingJobInfoListener - Migration job took 0 seconds to execute
17:24:35 [main] INFO  c.s.n.d.m.l.ProvidingJobInfoListener - 0 records were processed
17:24:35 [main] INFO  c.s.n.d.m.l.ProvidingJobInfoListener - 0 records were filtered
17:24:35 [main] INFO  c.s.n.d.m.l.ProvidingJobInfoListener - 0 records were skipped
17:24:35 [main] INFO  c.s.n.d.m.l.ProvidingJobInfoListener - 0 records were migrated
17:24:35 [main] INFO  c.s.n.d.m.l.ProvidingJobInfoListener - Created 'Rebuild repository browse' and 'Rebuild repository search' tasks. They will automatically one-time run after starting your Nexus Repository instance.
17:24:35 [main] INFO  c.s.n.d.m.l.ProvidingJobInfoListener - Migrated the following formats: [APT, COCOAPODS, CONAN, CONDA, DOCKER, GITLFS, GO, HELM, MAVEN2, NPM, NUGET, P2, PYPI, R, RAW, RUBYGEMS, YUM]
17:24:35 [main] INFO  o.s.j.d.e.EmbeddedDatabaseFactory - Shutting down embedded database: url='jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=false'

All the backup files have read-only permissions (-r--r--r-- ), while the migrator JAR has read-write permissions (-rw-r--r-- ).

For the database migration process, the migrator needs to be able to write to the current directory to create the output H2 database file (nexus.mv.db ). The current permissions suggest that while you can read the backup files, you might not have write permissions to the directory itself.

The backup directory is writable. Any I have the same behavior when running this on Windows.

You should have double hyphen --migration_type not -migration_type, I’m not sure whether that is the only issue you’re encountering.

https://help.sonatype.com/en/legacy-database-migration.html#migrating-to-h2

It is, how stupid of me. Thanks for spotting this!