Skip to main content

Configure and Run the Backup Task

Tip

Sonatype recommends periodic offline backups of embedded database files while the Repository process is stopped.

There are two scheduled tasks that you can use for database backup depending on what database you are using (OrientDB or H2).

Note

PostgreSQL backups take place outside of Nexus Repository and are not covered in our documentation. See PostgreSQL documentation for more information.

In either case, you will need to follow the steps in Tasks to configure and run a new backup task.

See the sections below for your specific database for additional explanations of backup task-specific fields.

Configuring the Backup Task for H2

If you are using H2, you will configure a new Admin - Backup H2 Databasetask for database backup.

Beyond the standard fields described in Tasks, the form for this task includes a field called Location. In this field, enter the path to a directory where you want to store backup data.

78580494.png

Figure: Admin - Backup H2 Database Form

When the task runs, it exports backup data to the path specified in the Location field. The directory you input will contain a zip file that will contain the H2 database directory (nexus.mv.db).

Configuring the Backup Task for OrientDB

If you are using OrientDB, configure a new Admin - Export databases for backuptask for database backup.

Beyond the standard fields described in Tasks, the form for this task includes a field called Backup location. In this field, enter the path to a directory where you want to store backup data.

10551362.png

Figure: Admin - Export databases backup Task Form

When the task runs, it exports backup data to the path specified in the Backup location field. The directory you input will contain .bak files of the following databases:

  • Component - All related data that make up components within the repository manager

  • Configuration - General administrative configurations such as scheduled tasks and email server configuration

  • Security - All user and access rights management content

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