Reputation: 188
I have an FTP server which has a lot of files (almost 400 GB) in it following a particular directory structure. But I got a requirement to migrate from FTP to Jfrog artifactory. Is there any way to copy the entire files under this FTP server to Jfrog artifactory Generic type repository with preserving the folder structure used in FTP.
I tried deploying as an archive from UI (basically using REST API). But there is a limit that we can upload them as chunks of 100MB and it became tedious for me to follow this approach.
Can anyone suggest the other better way (command line or programmatic way or REST way) to do this?
Upvotes: 1
Views: 2067
Reputation: 331
You can use JFrog CLI to upload entire directory to Artifactory https://www.jfrog.com/confluence/pages/viewpage.action?pageId=53577563
So in your case the only requirement is that the FTP server can connect to Artifactory over HTTP/HTTPS.
Then you just need to download JFrog CLI to FTP server and upload your files:
jfrog rt u "path_to_files/*" my-local-repo/ftp_copy
Upvotes: 1
Reputation: 2770
I think you're looking for the Repository Import REST API:
POST /api/import/repositories?repo=<repository name>&path=<location in filesystem>
This should copy the folder structure and files at path
into repo
. Of course for this to work, your FTP content must be visible from Artifactory's filesystem.
Upvotes: 2