Convert Between Repository Types

Convert repositories between local, Federated, and Build-Info types in JFrog Artifactory.

Convert repositories between local, Federated, and Build-Info types. This topic covers all supported conversion paths.

Who can perform this task: Platform Administrators

Convert a Local Repository to a Federated Repository

Using the Platform UI

🚧

Warning

Repository federations and replication cannot co-exist in the same repository. If you previously set up the local repository for repository replication, Artifactory automatically deletes these replication definitions when you convert the local repository to a Federated repository.

To convert a local repository to a Federated repository:

  1. In the Administration module, click Repositories.

  2. Use the Repositories filter to show local repositories.

  3. At the end of the row for the relevant local repository, open the Actions menu and select Convert to Federated.

  4. A prompt appears asking if you are sure you want to convert the local repository to a Federated repository.

    prompt_to_convert_to_federated.png

    Click Convert.

Optionally, add other members to the Federated repository. See Create a Federated Repository.

📘

Note

Removing the repository from the Federation does not automatically revert the repository to a local repository. Removing a repository from the Federation simply disconnects the bi-directional sync. The repository remains Federated. Use the Convert Federated Repository to a Local Repository REST API to convert back to local, if required.

Using the REST API

Use the Convert Local Repository to a Federated Repository REST API.

📘

Note

Removing the repository from the Federation does not automatically revert the repository to a local repository. Removing a repository from the Federation simply disconnects the bi-directional sync. However, the repository remains Federated.

Use the Convert Federated Repository to a Local Repository REST API to convert back to local, if required.

Convert a Federated Repository to a Local Repository

You can convert a Federated repository back to a local repository using the Convert Federated Repository to a Local Repository REST API.

🚧

Warning

The conversion from Federated back to local is allowed only if the Federated repository is not part of an active Federation containing additional members. Check membership on the Federation Dashboard before converting.

Convert a Build-Info Repository to a Federated Repository

Build-Info repositories can be set as a Federation member. From Artifactory 7.35, you can convert an existing Build-Info repository to a Federated repository using the REST API.

📘

Note

The Federated repository cannot be converted back to a local Build-Info repository.

Step 1: Convert the Build-Info Repository

Convert the Build-Info repository to a Federated repository:

POST /artifactory/api/federation/migrate/<BUILD_INFO_REPO_NAME>

Where:

  • <BUILD_INFO_REPO_NAME>: The key of the Build-Info repository to convert

Sample input:

POST /artifactory/api/federation/migrate/artifactory-build-info
Migration finished successfully.

Step 2: Add Members to the Build-Info Federation

After conversion, add members to the Federation using the Update Repository Configuration REST API. You can also manage membership through the Platform UI; see Add and Remove Federation Members.

{
    "key": "projectKey-build-info",
    "rclass" : "federated",
    "members": [
        { "url": "http://<target-JPD>/artifactory/projectKey-build-info", "enabled":"true"},
        { "url": "http://<target-JPD>/artifactory/projectKey-build-info", "enabled":"true"}
    ]
}

Frequently Asked Questions

This section provides answers to frequently asked questions.

plusFAQs
Q: Can I convert a Federated repository back to local if it still has active members?

A: No. The conversion is allowed only if the Federated repository isn't part of an active Federation containing additional members. Remove the other members first.

Q: What happens to my existing replication setup if I convert a repository to Federated?

A: Artifactory automatically deletes the replication definitions, since repository federations and replication can't coexist on the same repository.

Q: Can I convert a Federated repository back to a local Build-Info repository?

A: No. Once a Build-Info repository is converted to Federated, it can't be converted back to a local Build-Info repository.

Q: From which Artifactory version can I convert a Build-Info repository to Federated?

A: From Artifactory 7.35, you can convert an existing Build-Info repository to a Federated repository using the REST API.

Related Topics


Did this page help you?