Restore an H2 Database
The steps below cover restoring your H2 component database after running the Admin - Backup H2 Database task.
Note
Restore your blob stores containing components that were backed up at the same time the task was executed. Not doing so causes synchronization issues between the blob store and database.
Include all database files exported during the backup process which have the same timestamp. Do not attempt to restore individual database files individually as this will not be successful.
Stop Nexus Repository.
Locate the backup location directory specified in the Admin - Backup H2 Database task. The package is named with a timestamp similar to the following.
nexus-2024-09-05-10-02-29.zip
Unzip the zip file.
Copy the backup files and use them to replace the files in the
$data-dir/db
directory.Restore the corresponding blob store backup.
When the blob store and database backups are not taken at the same moment, they may be out of sync following a restore. Run the recognicle task to correct discrepancies between the database and the blob store.
See Tasks
Restart Nexus Repository and verify it is running correctly.