Import and Export Repositories

Import or export repository content in JFrog Artifactory for seeding, recovery, or migration.

Import and export repository content and configuration. In a Federation context, import and export operations can be used for initial data seeding, disaster recovery, or migrating content into Federated repositories.

This topic covers the following tasks:

Who can perform this task: Platform Administrators

Prerequisites:

  • Admin access to the JFrog Platform
  • Sufficient storage at the export destination or import source
  • For import: the source archive or directory is accessible from the Artifactory endpoint

Export a Repository

Using the Platform UI

To export a repository:

  1. In the Administration module, navigate to Artifactory Settings > Repository Imp/Exp.
  2. Select the Export tab.
  3. Choose the repository to export from the Source Repository dropdown.
  4. Configure the export settings:
SettingDescription
Target Export PathThe server-side path where the export is saved.
Include MetadataExport metadata (properties, statistics, and other data) along with binaries.
Create ArchivePackage the export as a ZIP archive.
Verbose LoggingEnable detailed logging during export.
Exclude ContentExport configuration only, without binary content.
  1. Click Export.

Using the REST API

To export a repository using the REST API:

  • Run the Export Repository REST API:

    POST /artifactory/api/export/<REPO_KEY>
    Content-Type: application/json
    
    {
        "path": "/export/path",
        "includeMetadata": true,
        "createArchive": false,
        "verbose": false
    }

    Where:

    • <REPO_KEY>: The key of the repository to export

    For example:

    POST /artifactory/api/export/libs-release-federated
    Content-Type: application/json
    
    {
        "path": "/export/libs-release-backup",
        "includeMetadata": true,
        "createArchive": true,
        "verbose": false
    }

Import a Repository

Using the Platform UI

To import a repository:

  1. In the Administration module, navigate to Artifactory Settings > Repository Imp/Exp.
  2. Select the Import tab.
  3. Choose the target repository from the Target Repository dropdown.
  4. Configure the import settings:
SettingDescription
Source PathThe server-side path to the import source directory or archive.
Include MetadataImport metadata along with binaries.
Verbose LoggingEnable detailed logging during import.
  1. Click Import.

Using the REST API

To import a repository using the REST API:

  • Run the Import Repository Content REST API:

    POST /artifactory/api/import/<REPO_KEY>
    Content-Type: application/json
    
    {
        "path": "/import/path",
        "includeMetadata": true,
        "verbose": false
    }

    Where:

    • <REPO_KEY>: The key of the target repository to import into

System-Level Import and Export

To perform a system-level import or export:

  1. In the Administration module, navigate to Artifactory Settings > Repository Imp/Exp.
  2. Select the System tab.
  3. Choose between Full System Export and Full System Import.
🚧

Warning

System-level import replaces all existing content. Use with extreme caution on Federation members that are actively synchronizing.

Federation Considerations

  • Importing into a Federated repository: When you import content into a Federated repository, the imported artifacts generate Federation events. These events propagate to all Federation members, causing the imported content to synchronize across the Federation.
  • Export does not include Federation configuration: Exported data includes repository content and metadata but does not include Federation membership or topology information. After importing, you must manually re-establish Federation membership.
  • Seeding new members: Use import/export to seed a new Federation member with existing content before joining it to the Federation. This reduces the initial synchronization load compared to relying solely on Full Sync.
  • Avoid concurrent imports: Importing large volumes of content into multiple Federation members simultaneously can create conflicting events. Import to one member and let Federation synchronize to the others.
  • Pause synchronization during large imports: For large imports, consider pausing synchronization on other members to avoid processing overhead, then trigger a Full Sync after the import completes.
👍

Tip

When migrating content from a local repository to a Federated repository, first convert the repository type, then let Federation handle the synchronization to all members.

Frequently Asked Questions

This section provides answers to frequently asked questions.

plusFAQs
Q: Does exporting a repository include its Federation configuration?

A: No. Exported data includes repository content and metadata but not Federation membership or topology. After importing, you must manually re-establish Federation membership.

Q: What happens when I import content into a Federated repository?

A: The imported artifacts generate Federation events that propagate to all Federation members, so the imported content synchronizes across the Federation automatically.

Q: Can I import into multiple Federation members at the same time?

A: Avoid it. Importing large volumes of content into multiple members simultaneously can create conflicting events. Import to one member and let Federation synchronize the rest.

Q: How do I seed a new Federation member before joining it to the Federation?

A: Use import/export to load existing content onto the new member first. This reduces the initial synchronization load compared to relying solely on a Full Sync.

Related Topics


Did this page help you?