Skip to main content

Configure the Backup Task

Scheduled tasks are available to back up the embedded databases (H2 or OrientDB).

Offline Backup

Sonatype recommends regular offline backups of the embedded database files while the Nexus Repository process is stopped. Embedded database backups are prone to corruption when taken while the server is running even using the scheduled task.

To mitigate this risk, we recommend periodically backing up the $data-dir/db folder.

Backup Task for H2

Configure the Admin - Backup H2 Database task for database backup. The task includes the Location field to enter the relative path to where you want to store backup data. Nexus Repository exports the backup data when the task runs and stores a zip file containing the H2 database (nexus.mv.db).

See the Tasks documentation for details on creating and running tasks.

Backup Task for OrientDB

Configure the Admin - Export Database for backup task for database backup. The task includes the Backup Location field to enter the relative path to where you want to store backup data. Nexus Repository exports the backup data when the task runs as a set of .bak files containing the Orient database directory.

All backup files are presented in the timestamp format based on the time the task was started.