Nexus Repository Artifact ManagementDatabase MigrationNexus RepositoryPostgreSQL

Article & Tutorial

Nexus Repository Database Migration: OrientDB, H2 and PostgreSQL

Plan a safe Nexus Repository database migration from legacy OrientDB or embedded H2 toward a supported target, with version checks, backups, staging, validation, and rollback.

Secure Nexus repository database migration with validation and backups
Secure Nexus repository database migration with validation and backups
Contents

Nexus Repository database migration is highly version-dependent. Supported paths, utilities, database engines, and licensing requirements can change between releases. Treat vendor documentation for the exact source and target versions as the authority before running any converter.

Define the supported path first

Record the current Nexus version, edition, Java runtime, database type, data-directory layout, installed plugins, repository formats, and target architecture. Confirm whether the intended migration requires an intermediate application upgrade or an intermediate database conversion.

Migration readiness checklist

  • Verify the vendor-supported source and target versions.
  • Read release notes for database and format changes.
  • Measure database size, blob-store size, and expected downtime.
  • Take application-consistent backups of the database, blob stores, configuration, and secrets.
  • Test that backups can be restored before changing production.
  • Provision enough temporary disk space for exports, logs, and rollback.

Never migrate the database alone

Repository metadata and blob content must remain consistent. Copying only database files, or only blob stores, can create missing components and checksum errors. Stop writes at the documented point and preserve one coherent recovery set.

Use a staging rehearsal

  1. Clone production data into an isolated environment.
  2. Install the exact supported migration utility and runtime.
  3. Run prechecks and capture complete logs.
  4. Execute the documented migration path.
  5. Start the target version and inspect application logs.
  6. Validate repositories, components, permissions, tasks, and integrations.
  7. Measure duration and refine the production runbook.

Validation after conversion

AreaValidation
RepositoriesHosted, proxy, and group repositories load correctly
ArtifactsRepresentative downloads and metadata resolve
SecurityUsers, roles, privileges, and tokens behave as expected
AutomationCI jobs can publish and retrieve approved packages
OperationsCleanup, repair, backup, and scheduled tasks run
IntegrityNo unexplained database, blob, or checksum errors appear

Production cutover

Announce the freeze window, stop clients and scheduled writers, take a final recoverable backup, execute the rehearsed steps, and retain migration logs. Open access only after technical and business validation. Keep the original environment intact until the acceptance window closes.

Rollback criteria

Define time and integrity thresholds that trigger rollback. Rollback should restore the application, database, blob stores, and configuration as one matched set. Do not allow writes to both old and new environments during an uncertain cutover.

Version and edition decide the migration path

The legacy OrientDB database is not supported in Nexus Repository 3.71.0 and later. For self-hosted OrientDB migrations, Sonatype documents upgrading to the final 3.70.5 line before migrating. Pro deployments may be eligible for direct OrientDB-to-PostgreSQL migration, while Community Edition generally follows OrientDB-to-H2 first, with PostgreSQL support in later versions. Check the exact release and licensing path before selecting a migrator; never assume that a migrator from a different release is interchangeable.

Migration planning matrix

Starting pointPlanning decision
OrientDB on legacy releaseRehearse upgrade to 3.70.5, use its supported migration tooling, then upgrade the application and Java in documented order
H2 on older releasesCheck H2 v1-to-v2 export/import requirements; older H2 installations can require an intermediate upgrade
H2 to PostgreSQLConfirm target release, compatible migrator, database schema/permissions, backups and maintenance window
PostgreSQL to newer NexusCheck release compatibility, Java requirements, repository format changes and normal upgrade procedure

Preflight inventory — copy this into the change ticket

  • Nexus Repository version and Community/Pro edition; actual database engine and Java runtime
  • Blob-store size, database size, repository formats (especially OCI), task schedules, plugins and authentication integrations
  • Exact supported migrator version and documented path for source and destination
  • Application-consistent backups of database, blob stores, configuration and secrets, with a tested restore
  • Enough free RAM and disk space for the utility; the Database Migrator documentation specifies at least 16 GB RAM and three times the database-directory size (minimum 10 GB)
  • A downtime budget, staged rehearsal log, rollback owner and go/no-go acceptance criteria

Critical OCI warning for specific migrator releases

Sonatype documents an issue in Database Migrator versions 3.94.0 through 3.98.0 when migrating between H2 and PostgreSQL with OCI repositories. It can cause OCI pull HTTP 500 responses and missing or corrupted target data. Do not use an affected migrator version for OCI repositories; verify the current Sonatype warning and supported alternative before any production change.

Runbook: rehearse, freeze, migrate, verify

  1. Capture version, edition, Java, database, blob stores and repository inventory. Confirm an official support path.
  2. Take and restore-test a coordinated backup; preserve source data unchanged.
  3. Rehearse the documented migration against an isolated copy using the compatible tool and runtime, collecting logs and timings.
  4. At cutover, stop writers and Nexus where required, take the final backup, then execute only the reviewed vendor procedure.
  5. After startup, allow required browse/search index rebuild and post-migration tasks to finish before restarting or releasing traffic.
  6. Test hosted and proxy package downloads, representative uploads, OCI pulls if applicable, permissions, tokens, scheduled tasks and integrations. Revert using the matched application, metadata, blob and configuration backup if acceptance fails.

Vendor references and related learning

Read the official version-specific guidance before running a migrator: https://help.sonatype.com/en/upgrading-to-nexus-repository-3-71-0-and-beyond.html and https://help.sonatype.com/en/migrating-to-a-new-database.html. For adjacent concepts see https://melochip.com/posts/mysql-vs-postgresql-vs-mongodb-which-database-to-choose-2026.

Sonatype: upgrade beyond Nexus 3.70

Sonatype: database migration guide and alerts

Database comparison on Melochip

Nexus Repository documentation

Did this help?

Yes No

Join the discussion

0 Comments

Ask questions, add context, or share what worked.

Sign in to join the discussion

No comments yet. Start the discussion.

More from Melochip Editorial

Related articles

Stay in the loop. Get new Melochip articles

Receive Melochip article updates when new articles are available. Explicit opt-in only.

No pre-checked boxes. Unsubscribe support is part of the subscriber foundation.