Note: Importing repositories is supported for all users whereas exporting repositories is only available for non-SaaS users. |
To access import and export of repositories, in the Administration module, select Artifactory | Import & Export | Repositories.
When exporting, you need to specify the following parameters:
Target Local Repository | You can specify a single repository to export, or All Repositories | |
Export Path on Server | The export target directory on your server | |
Exclude Metadata | When set, repository metadata is excluded from the export. (Maven 2 metadata is unaffected by this setting) | |
Create .m2 Compatible Export | When set, includes Maven 2 repository metadata and checksum files as part of the export | |
Output Verbose Log | When set, lowers the log level to "debug" and redirects the output from the standard log to the import-export log.
|
To disable the system import option, set the artifactory.system.import.enabled property in the To access import and export of your entire system, in the Administration module, select Import & Export | System |
You can import repositories from a server-side folder, or by zipping a repository and uploading it to Artifactory.
When importing, you need to specify the following parameters:
Target Local Repository | You can specify a single repository to import, or All Repositories. The repository layout should be different depending on your selection. Please refer to Import Layout. | |
Server Path for Import | The import source directory on your server | |
Repository Zip File | Applicable when importing repo from zip file. Drop the repository zip file | |
Exclude Metadata | When set, repository metadata are excluded from the import | |
Output Verbose Log | When set, lowers the log level to "debug" and redirects the output from the standard log to the import-export log.
|
To work with a Docker repository, it must have its metadata intact. Therefore, when importing to/exporting from a Docker repository make sure that Exclude Metadata is not checked. |
You can take advantage of remote repositories you have already downloaded to your local environment, and import them directly into a local repository. For example, you can take your local Maven repository (usually located under ~/.m2) and upload it into Artifactory so that all the artifacts you have already downloaded are now available on the server. |
An imported repository needs to be formatted using a Maven 2 repository layout.
When importing a single repository, the file structure within the import folder (or zip file) should be as follows:
IMPORT_FOLDER/ZIP_FILE | |--LIB_DIR_1 |
When importing all repositories, the file structure within the import folder should be as follows:
IMPORT_FOLDER/ZIP_FILE | |--REPOSITORY_NAME_DIR_1 | | | |--LIB_DIR_1 |
When importing all repositories, you need to ensure that the names of the directories representing the repositories in the archive match the names of the target repositories in Artifactory. |
Artifactory maintains all security entities (users, groups, permissions and access tokens) when doing a system import.
The System Import and Export feature is not available for Artifactory Cloud users. |
We do not recommend that you import and export between different versions of Artifactory. |
It is very important that the import files on the server should be readable and owned by the same user running the Artifactory process. |
Although we do not recommend it, when you import from a 6.x export into a 7.x installation, you need to replace the |
To access import and export of your entire system, in the Administration module, select Artifactory | Import & Export | System.
Export Path on Server | The target directory for the exported files. You may browse your file system to select the directory | |
Exclude Content | Export: When set, repository binaries are excluded from the export. Import: When set, binaries and metadata are excluded from the import. Only builds and configuration files are imported. | |
Exclude Metadata | When set, repository metadata are excluded from the import/export.
| |
Create .m2 Compatible Export | When set, includes Maven 2 repository metadata and checksum files as part of the export | |
Create a Zip Archive (Slow and CPU Intensive!) | When set, creates and exports to a Zip archive | |
Output Verbose Log | When set, lowers the log level to "debug" and redirects the output from the standard log to the import-export log.
|
The source/target of the import/export operations are folders (Zip archives are not recommended) on the Artifactory server itself.
You can use the built-in server-side browsing inside Artifactory to select server-side source/target folders:
Importing or exporting a large amount of data may be time consuming. During the import/export operation you can browse away from the page and sample the System Logs to monitor progress. |
When performing a system export and subsequent import for an HA cluster, you need to follow the procedure below to ensure that the cluster is able to correctly synchronize its nodes.
When importing from a 6.x export into a 7.x installation, you will need to replace the |
$JFROG_HOME/artifactory/var/etc/access
$JFROG_HOME/artifactory/var/etc/security
$JFROG_HOME/artifactory/var/etc/artifactory/ui
$JFROG_HOME/artifactory/var/etc/artifactory/plugins
Copy the $JFROG_HOME/artifactory/var/etc/security/master.key
from the running node to the additional nodes.
Copying the |
Once you have completed the import, we recommend verifying that your HA cluster is up and running by checking whether all the nodes and services are online. For more information on viewing service status, see Monitoring Service Statuses.
After an import, the services of Distribution, Xray, Pipelines, and Insight should be restarted. |