If you have internet access and have the CLI directly installed on your Artifactory source instance which is not a Kubernetes or Docker install.
Then you can install the data-transfer user plugin automatically by running the following command:
jf rt transfer-plugin-install source-server
If the source instance does not have internet access or is a Kubernetes or Docker based install, then we will load the plugin manually:
- We will need to load the plugin files onto the source instance in this directory:
/opt/jfrog/artifactory/var/etc/artifactory/plugins
- a) For an airgapped instance, follow these instructions on a machine with internet access then copy the files to the correct location in the airgapped instance.
b) For K8s or docker, exec into the container and download the Plugin using CURL (The only tool possible in this container):
The plugin is composed of 2 files
- Groovy file, that should be inserted to the plugins directory
- Jar file, that should be inserted in a lib directory as its sub folder. It must be manually created if it does not exist.
cd /opt/jfrog/artifactory/var/etc/artifactory/plugins
curl -O "https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/[RELEASE]/dataTransfer.groovy" --globoff
#Then create a lib directory inside the plugins directory if not alreadt present
mkdir lib
cd lib
#Now download the jar file:
curl -O "https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/[RELEASE]/lib/data-transfer.jar" --globoff
Once this has been added, we should run the following API command to Reload Plugins:
https://jfrog.com/help/r/jfrog-rest-apis/reload-plugins
curl -X POST -uadmin:<pass> <Artifactory-server-address>/artifactory/api/plugins/reload
Note:
Step 1 and 2 can be done in any order, just note that the target-server connection to the CLI must be done after the import as the import will wipe/replace all access tokens on the target server.