Error while migrating db from OrientDB to H2 - Sonatype Nexus Repository - Sonatype Community
Error while migrating db from OrientDB to H2
post by Will on Jan 3, 2025
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.
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:
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
post by rseddon on Jan 3, 2025
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
post by Will on Jan 7, 2025
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