Skip to main content

Repository Export

Only available in Sonatype Nexus Repository Pro. Interested in a free trial? Start here.

The Repository - Export assets task exports content from a selected repository into a file directory. The content of this export may be imported to another repository instance.

Requirements

Consider the following requirements when creating the export task.

  • Configure the task to run manually or on a schedule

    Schedule the task to export new content added to the repository since the previous run.

  • Only one import/export task may run at a time

    Export and Import tasks are queued to run when the previous tasks completes.

  • The target directory must be writable by the user and nodes running Nexus Repository

    On highly available deployments, the target directory must be in a shared location accessible to all nodes in the environment.

  • The export does not stop on errors

    Every exported file is logged to a task log created for each run along with errors that may have occurred.

  • The export history is stored in the target directory to enable incremental exports

    The export task generates a .nexus hidden directory inside of the target directory that contains metadata used for subsequent exports to avoid the same content being exported more than once. and only export new content added to the repository.

  • Content may be safely deleted from the export directory

    To save space in your export folder, navigate to the target folder and delete any files in the folder except for the .nexus directory to avoid re-exporting previously exported content.

Configuration

Use the following steps to create a new import task.

  1. From the Settings panel navigate to Tasks and select the Create task button

  2. Select the task, Repository - Export assets from the task list

  3. Fill out the export configuration from the options below:

nx3-tasks-export-repository.png
  • Task name

    A unique name to reference the task.

  • Notification email

    The email address where notifications on the status of the export task are sent.

  • Send notification on

    A notification may be sent only if the task fails or on either a success or failure.

  • Source Repository

    The repository to export content from. This list only populates with repositories of the supported formats.

  • Target directory

    The directory to export content into.

  • Threshold of unused assets to include

    Use to export unused assets for to archive. Export assets not updated or downloaded in the provided number of days. Leave blank or set to zero (0) to include all assets. Assets differ from individual components in that they include files associated with the component such as hash and metadata files.

    To delete assets after exporting them, use the paths from the export log to delete the contents from the server.

  • Task frequency

    Configure the job to run automatically at a specific time or manually as a run-once task. Often export jobs are manually run. Scheduled jobs will only export files when the artifacts are newly added or missed from a previous export criteria.

Supported Formats

Currently, content can be exported from repositories of any format listed below:

Format

Since

Raw

3.24.0

Maven

3.24.0

npm

3.25.0

NuGet

3.25.0

Docker

3.26.0

PyPI

3.26.0

RubyGems

3.26.0

Yum

3.26.0