Skip to main content

Restore Exported Databases

You can restore exported database files to the state when you ran the scheduled backup task by taking the following steps:

  • Access the location specified in the Backup location field from the Admin - Export databases for backup task (OrientDB) or Admin - Backup H2 Database task (H2) where the databases were exported

  • Remove all of the database directories in order to restore them to the previous state

The restoration should include all of the databases exported during the backup process. Do not restore the databases individually, and only use files from a single backup (i.e., those with the same timestamp).

Start the database restoration with these steps:

  1. Stop Nexus Repository

  2. Remove the following directories from $data-dir/db

    • component

    • config

    • security

  3. Go to the location where you stored the exported databases

  4. Copy the corresponding .bak files to $data-dir/restore-from-backup for restoration (Note: For version 3.10.0 or earlier use $data-dir/backup as the restore location)

  5. Restore blob store backup corresponding to the DB backup

  6. Restart Nexus Repository

  7. Verify Nexus Repository is running correctly

  8. Remove .bak files from restore-from-backup directory

You can verify the restoration is complete by viewing the fully-restored databases previously removed from $data-dir/nexus3/db.

Warning

As noted above, when the component database is restored, the corresponding blob stores containing components must also be restored. Not doing this will cause syncronization issues between the blobstore and the database.

Warning

If the blob store and database backups were not taken at exactly the same moment they may be out of sync following a restore. To fix this, schedule and run a Repair - Reconcile component database from blob store task under SystemTasks in the Adminitration UI.