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

**URL:** <https://community.sonatype.com/t/nexus-db-migrator-3-70-4-02-for-orientdb-backup-doesnt-produce-any-h2-file/14733>\
**Category:** Sonatype Nexus Repository\
**Tags:** docker, nexus-migration\
**Created:** [April 2, 2025, 1:14pm UTC](https://community.sonatype.com/t/nexus-db-migrator-3-70-4-02-for-orientdb-backup-doesnt-produce-any-h2-file/14733 "2025-04-02T13:14:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Armin\_Müller](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@Armin\_Müller](https://community.sonatype.com/u/Armin_M%C3%BCller)\
**Post date:** [April 2, 2025, 1:14pm UTC](https://community.sonatype.com/t/nexus-db-migrator-3-70-4-02-for-orientdb-backup-doesnt-produce-any-h2-file/14733/1 "2025-04-02T13:14:50Z")

</div>

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](http://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045/5)

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:

```auto
-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

```auto
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:

```auto
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'

```

---

<div class="post-metadata">

**Author:** ![laurencet](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/laurencet/32/3456_2.png) [@laurencet](https://community.sonatype.com/u/laurencet)\
**Post date:** [April 2, 2025, 1:46pm UTC](https://community.sonatype.com/t/nexus-db-migrator-3-70-4-02-for-orientdb-backup-doesnt-produce-any-h2-file/14733/2 "2025-04-02T13:46:22Z")

</div>

> [@Armin\_Müller](#):
>
> `started by amueller`

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.

---

<div class="post-metadata">

**Author:** ![Armin\_Müller](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@Armin\_Müller](https://community.sonatype.com/u/Armin_M%C3%BCller)\
**Post date:** [April 3, 2025, 1:10pm UTC](https://community.sonatype.com/t/nexus-db-migrator-3-70-4-02-for-orientdb-backup-doesnt-produce-any-h2-file/14733/3 "2025-04-03T13:10:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [April 7, 2025, 1:32pm UTC](https://community.sonatype.com/t/nexus-db-migrator-3-70-4-02-for-orientdb-backup-doesnt-produce-any-h2-file/14733/4 "2025-04-07T13:32:22Z")

</div>

> [@Armin\_Müller](#):
>
> `nexus-db-migrator-3.70.4-02.jar -migration_type=h2`

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](https://help.sonatype.com/en/legacy-database-migration.html#migrating-to-h2)

---

<div class="post-metadata">

**Author:** ![Armin\_Müller](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@Armin\_Müller](https://community.sonatype.com/u/Armin_M%C3%BCller)\
**Post date:** [April 7, 2025, 5:38pm UTC](https://community.sonatype.com/t/nexus-db-migrator-3-70-4-02-for-orientdb-backup-doesnt-produce-any-h2-file/14733/5 "2025-04-07T17:38:43Z")

</div>

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