# Error while migrating db from OrientDB to H2

**URL:** https://community.sonatype.com/t/error-while-migrating-db-from-orientdb-to-h2/14111
**Category:** Sonatype Nexus Repository
**Tags:** upgrade, migrate
**Created:** [January 3, 2025, 3:00pm UTC](https://community.sonatype.com/t/error-while-migrating-db-from-orientdb-to-h2/14111 "2025-01-03T15:00:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Will](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Will](https://community.sonatype.com/u/Will)
#### Post date: [January 3, 2025, 3:00pm UTC](https://community.sonatype.com/t/error-while-migrating-db-from-orientdb-to-h2/14111/1 "2025-01-03T15:00:22Z")

</div>

Hi,

We are using a stand-lone version of Nexus 3.70.3-01.

When i’m using the db migrator tool to migrate the OrientDB to H2 i’m getting an error.

```auto
java.lang.IllegalStateException: Failed to execute ApplicationRunner
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:776)
        at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:763)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
        at com.sonatype.nexus.db.migrator.MigratorApplication.main(MigratorApplication.java:117)
Caused by: com.sonatype.nexus.db.migrator.exception.InvalidMigrationFilesException: The migration files in sonatype-work/nexus3/db-temp do not match the expected requirements: Not all required database names are present.

```

These are the present files:

```auto
drwxr-xr-x 2 nexus nexus 4096 Jan 2 14:28 analytics
-rw-r--r-- 1 nexus nexus 38440711 Jan 2 14:28 analytics-2024-12-12-17-48-49-3.70.3-01.bak
drwxr-xr-x 2 nexus nexus 12288 Jan 2 14:34 component
-rw-r--r-- 1 nexus nexus 324760 Jan 2 14:28 component-2024-12-12-17-48-49-3.70.3-01.bak
drwxr-xr-x 2 nexus nexus 12288 Jan 2 14:48 config
-rw-r--r-- 1 nexus nexus 2 Jan 2 14:49 frozen.marker
drwxr-xr-x 2 nexus nexus 4096 Jan 3 13:38 logs
-rw-r--r-- 1 nexus nexus 94 Jan 2 14:50 model.properties
-rwxr-xr-x 1 nexus nexus 56808416 Jan 2 14:29 nexus-db-migrator-3.70.3-01.jar
-rw-r--r-- 1 nexus nexus 16384 Jan 3 13:38 nexus.mv.db
drwxr-xr-x 2 nexus nexus 4096 Jan 2 14:47 OSystem
drwxr-xr-x 2 nexus nexus 4096 Jan 2 14:47 security
-rw-r--r-- 1 nexus nexus 198609 Jan 2 14:47 security-2024-12-12-17-48-49-3.70.3-01.bak

```

According to the error a file is missing. Can you tell me which file(s) is/are missing?

Regards, Will

---

<div class="post-metadata">

### Author: ![rseddon](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/rseddon/32/341_2.png) [@rseddon](https://community.sonatype.com/u/rseddon)
#### Post date: [January 3, 2025, 10:13pm UTC](https://community.sonatype.com/t/error-while-migrating-db-from-orientdb-to-h2/14111/2 "2025-01-03T22:13:23Z")

</div>

There should be a config-2024-12-12-17-48-49-3.70.3-01.bak. Also for some reason there are many live database files in that directory. It should only contain files ending in “.bak”. I suggest making a new database backup in a different (empty) directory, and then trying the migration again.

Rich

---

<div class="post-metadata">

### Author: ![Will](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Will](https://community.sonatype.com/u/Will)
#### Post date: [January 7, 2025, 2:49pm UTC](https://community.sonatype.com/t/error-while-migrating-db-from-orientdb-to-h2/14111/3 "2025-01-07T14:49:04Z")

</div>

Hi Rich,

As you suggested i’ve created a new backup. As you told me that after the backup procedure the directory only contains .bak files, but i get the error that no database files where found. Also, in the log there is an error `Cannot open the storage 'component' because it does not exist in path: /data/nexus/sonatype-work/nexus3/db-tmp/component DB name="component"`  
Do you now what i have to do?

Regards, Will
