Skip to main content

Feature Availability for PostgreSQL and H2 Databases

Note

Only available in Sonatype Nexus Repository Pro. Interested in a free trial? Start here.

There are some important considerations to keep in mind before migrating to a new database:

  1. Not all formats are currently compatible with the new database options. Unsupported formats will not be migrated; you will not be able to add new formats that your new database does not support. Review Feature Compatibility and ensure that your new database supports all of your formats before migrating.

  2. There are some permanent differences at a detailed level.

  3. Migration is a one-time process; attempts to migrate again will overwrite data.

Feature Compatibility

The table below details features and formats that are compatible and incompatible with the new databases.

Compatible with New Databases

Not Compatible with New Databases

Formats

  • Apt

  • Cocoapods

  • Conan

    • Hosted Conan repositories only available for those using H2 or PostgreSQL

  • Conda

  • Docker

  • Git LFS

  • Go

  • Helm

  • Maven

  • npm

  • NuGet V2

    Note

    Notable Compatibility Change for H2 or PostgreSQL Database Deployments

    In Sonatype Nexus Repository release 3.43.0, we added compatibility with official NuGet v2 clients. The supported subset of the legacy NuGet v2 protocol is the same as that supported by Microsoft's NuGet Gallery, nuget.org. Use cases that rely on the deprecated parts of the v2 API are not supported, including many common Chocolatey use cases and some custom OData queries.

  • NuGet V3

  • p2

  • PyPI

  • R

  • Raw

  • RubyGems

  • Yum

Cross-Cutting Features

  • Search, Browse

  • Blob Storage, Groups

  • Cleanup Policies

  • Staging/Tagging

  • Routing Rules

  • Firewall/IQ Integration

  • REST API

  • Security, Content Selectors

  • SAML/SSO, Crowd, LDAP

  • RUT Auth, User Tokens

  • Tasks

  • 2-to-3 Upgrade Migrator

  • Import/Export

Features Only Available When Using a PostgreSQL Database

Community Formats

  • APK

  • Composer

  • CPAN

  • Puppet

Legacy Formats

High Availability Clustering (HA-C)

(Replaced by new High Availability Deployment Options, which require a PostgreSQL database.)

Feature Changes

While we've made every effort to keep Nexus Repository's external behavior consistent during this change, there are a number of differences to note.

Asset Name Matcher Regular Expressions

In OrientDB environments, the Asset Name Matcher (part of our Cleanup Policies feature) uses Lucene regular expressions; in H2 or PostgreSQL environments, it uses Java regular expressions. The major difference is that the Lucene regular expressions are anchored by default (meaning that they must match the entire asset name if there isn’t a wildcard somewhere in the regex). Java regular expressions are not anchored by default.

This means that a regular expression that only matched specific options before migrating to H2 or PostgreSQL may match more items after migration.

Example of an Expression That Matches More Items After Migration to PostgreSQL/H2

This example contains the following assets for consideration:

/antlr/antlr/2.7.2/antlr-2.7.2.jar

/org/antlr/antlr-master/3.1.3/antlr-master-3.1.3.pom

The example Sonatype Nexus Repository instance has a cleanup policy where the Asset Name Matcher uses the regex antlr.*.

When running cleanup on OrientDB, /antlr/antlr/2.7.2/antlr-2.7.2.jar is removed while /org/antlr/antlr-master/3.1.3/antlr-master-3.1.3.pom was not removed.

After upgrading to an H2 instance and re-running the same cleanup policy, both components were removed.

High Availability Clustering (HA-C)

High Availability Clustering in its current form is a feature of the embedded OrientDB database. Database externalization lays the groundwork for a new clustering method based on stateless nodes that will be easier to manage and more flexible. Once this is released, HA-C will be deprecated and replaced.

Bower Format - Legacy

In 2017, Bower maintainers announced that Bower itself was deprecated and began recommending that developers switch to package managers such as Yarn. The Bower format will not be made compatible with the new database architecture.

Backup & Restore

You can back up the embedded H2 database using the same process you've used before, but you will need to use the Admin - Backup H2 Database scheduledtask.

Any existing OrientDB backups will not be compatible with either of the new database options. Nexus Repository will no longer handle external PostgreSQL database backups; this will be the system administrator's responsibility.

Asset Paths

References to Assets via the REST API now require a forwardslash in front a path to work. For example "ticketlist.txt" now must be "/ticketlist.txt".

Logs

There are no changes to log file locations, but any logging related to database interactions will be different.

Groovy Scripting

Nexus Repository has a feature for extending its functionality with Groovy scripts. (This feature is disabled by default for security reasons, but is still available.) In many cases, these scripts accessed undocumented, non-public Nexus Repository APIs. You may need to update scripts connecting to non-public APIs in order for them to work.

For both security and forward compatibility reasons, we recommend making use of the public REST API as much as possible rather than using Groovy scripting.

Webhooks Events

  • Asset events contain the same information as before except that the value assigned to the asset name now begins with a forward slash. Beginning the asset's name with a forward slash is not specfic to webhooks.

  • There are no changes to the contents of a Component event.

  • The following event types are generated for respository uploads:

    • Asset and Component events of type CREATED - the quantities of these are the same as before.

    • Several Asset and Component events of type UPDATED - more events of this type are generated.

  • The following scenarios will emit an event of type PURGED containing the IDs of all deleted assets and components:

    • When performing component clean up. Nexus Repository no longer generates DELETED events for each component and asset deleted during component clean up.

    • Whenever deleting the last component from a maven repository.

  • Deleting individual assets/components (i.e., not via component clean up) from a repository generates the same number and types of events as before.

Coordinate-Based Content Selectors

Path-based content selectors are fully compatible with the new architecture. However, we are using the transition to remove a deprecated feature: coordinate-based content selectors. These are any content selectors with references to format-specific coordinates.

External Plugins

You will need to update external plugins that introducenew repository types, interact repositories or repository content, or interact with the database directly to be compatible with the new data access approach.