Skip to main content

Backing up the IQ Server


Backup procedures and requirements for IQ Server are different to Nexus Repository.

Sonatype recommends that you document and follow a data recovery plan in accordance with your company’s policies. Regular backups are an important disaster recovery safeguard. In the ideal scenario, your IQ Server configuration and database is backed up automatically and at regular intervals.

Understanding IQ Server Backups

Regardless of your deployment type, the minimum required files for a full, point-in-time backup include:

  • Your database.

  • Your reports.

  • Your configuration.

  • The IQ Server binaries.

In a default, local installation of IQ Server, these files are located in your installation directory.

  • Your sonatype-work\clm-server\data folder.

  • Your sonatype-work\clm-server\report folder.

  • Your config.yml file.

  • Your IQ Server .jar, e.g. nexus-iq-server-1.***.0-01.jar.

There are other IQ Server files that you may decide to backup, which include:

  • Your log files.

  • Your license file.

  • Your cloned SCM repositories (sonatype-work\clm-server\source-control).

  • Your custom trust stores.

When deciding the scope of your backup, refer to your organization's data storage policy, and remember that some files used by IQ Server could have sensitive information.

Before and After a Backup

Backing up the IQ Server is an important disaster recovery safeguard, and Sonatype recommends that you back up at least once a day. The length of your backup task will depend on a number of factors, including your database's size and the bandwidth of your connection. In all cases, plan for a maintenance window and, if backing up automatically, schedule it for off hours.

By default, Continuous Monitoring is configured to run at midnight. This may interfere with your scheduled backup task.

Validate your first backup of IQ Server in a test environment to ensure it's correct.

Backup Procedures per Deployment Type

Enterprise deployments with an external Postgres database

A minimum backup of a deployment with an external Postgres database includes your IQ Server .jar, the config.yml file, and your sonatype-work folder, along with your connected Postgres database.

One major advantage of using a Postgres database with IQ Server is that a full backup can be completed without shutting down the IQ Server, which is called a hot backup.

To backup a deployment with the external Postgres database:

  1. Copy the IQ Server .jar and config.yml to your backup location.

  2. Copy the sonatype-work folder to your backup location.

  3. Backup the Postgres database to your backup location.

Your Postgres databases may be managed by a database administrator. If so, bring them into the conversation about your backup procedures. Try to ensure that your backup of the IQ Server and the sonatype-work and their backup of the Postgres database happen simultaneously, or as close to simultaneously as possible.

Enterprise deployments with the embedded H2 database

The safest and most reliable way to backup a deployment with the embedded H2 database is to:

  1. Shut down the IQ Server.

  2. Copy the IQ Server .jar, the config.yml file, and the sonatype-work folder to your backup location.

  3. Start the IQ Server.

The H2 database in an in-memory database, so any backup of the database while IQ Server is running carries the risk of catching the database in an inconsistent state. Shutting down the IQ Server before backing up ensures a full, stable, reliable backup.

To reduce downtime, use a backup tool that allows for incremental backups. To use a tool like this effectively, make an initial copy of the sonatype-work folder while IQ Server is still running. Once that completes, shut down the IQ Server and run the tool again. This second copy should run quickly.

Ideally, your backup tool will integrate with your CI pipeline and be configured to make backups automatically.


One example of a continuous incremental backup tool is rsync, which is found in Linux distributions. Start the process with:

rsync -avP <source> <dest>

Once that completes, shut down the IQ Server and run rsync again with:

rsync -avP --del <source> <dest>

Containerized Deployments

Containerized deployments require persistent volumes. If using the embedded H2 database, your persistent volume contains everything the IQ Server needs to run, including the server .jar, the configuration files, and the embedded H2 database. If using the Postgres database with a containerized deployment, that Postgres database is likely also containerized.

Apply your backup strategy to your persistent volumes to ensure a full and complete backup.

Your organization may have a team responsible for maintaining your containerized apps. If so, bring them into your conversation early to ensure a repeatable backup procedure is in place.