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.
Both the source and destination Nexus Repository managers must be on the same version to avoid data loss Configure the task to run manually or on a schedule Only one import/export task can run at a time Other export task are queued to run after 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 muct 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.
Configuration
Use the following steps to create a new import task.
From the Server Administration panel navigate to
Tasks
and select theCreate task
buttonSelect the task,
Repository - Export assets
from the task listFill out the export configuration from the options below:
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 |