# [Migrating to a PostgreSQL Database for Nexus Repository](https://community.sonatype.com/t/migrating-to-a-postgresql-database-for-nexus-repository/14327)

## post by jzora on Feb 4, 2025

Jonathan Zora

If you’re treating Nexus Repository like the critical piece of digital infrastructure it is, then you want stability, flexibility, and minimal downtime. The **absolute, hands-down best way to get those things** is to make migrating to an external PostgreSQL database a priority.

Depending on your current deployment, migrating might take a bit of effort. Here’s the basic workflow:

- Determine your current database.
- Upgrade to 3.70.03, if you’re not there already.
  - Download the correct binaries depending on whether you’re currently using [OrientDB](https://help.sonatype.com/en/orientdb-downloads.html) or [H2.](https://help.sonatype.com/en/download-archives---repository-manager-3.html#nexus-repository-3-70-3-01)
  - [Prepare a full backup.](https://help.sonatype.com/en/backup-and-restore.html)
  - [Complete the pre-upgrade checklist.](https://help.sonatype.com/en/upgrading-a-standalone-instance.html#pre-upgrade-checklist)
  - [Complete the upgrade.](https://help.sonatype.com/en/upgrading-a-standalone-instance.html#perform-the-upgrade)
- Migrate to Postgres.
  - [Review our migration considerations.](https://help.sonatype.com/en/migrating-to-a-new-database.html#considerations-before-migrating-162010)
  - Fetch the migrator tool (for [OrientDB](https://help.sonatype.com/en/orientdb-downloads.html) or [H2](https://help.sonatype.com/en/migrating-to-a-new-database.html#migrating-from-h2-to-postgresql)).
  - Complete the migration procedures. Make sure you follow the correct procedure, depending on whether you’re currently using [OrientDB](https://help.sonatype.com/en/migrating-to-a-new-database.html#migrating-from-orientdb-to-postgresql-162010) or [H2.](https://help.sonatype.com/en/migrating-to-a-new-database.html#migrating-from-h2-to-postgresql)
  - Start Nexus Repository and allow two [post-migration tasks](https://help.sonatype.com/en/migrating-to-a-new-database.html#long-running-database-post-migration-tasks) to complete.

Attached to this post is a .pdf for you to save, distribute, and reference.
