How can I export/import from/to a mapped/shared drive when Artifactory is running as a Windows Service

JFrog Support
2017-06-18 10:09

Windows Services have no knowledge about user-specific shared network drives (mounted with a drive letter). Instead, Microsoft recommends that you use a UNC path (Universal Name Convention path) to denote the path to the shared drive via an application. In Artifactory versions 4.x and 5.x, the GUI may not allow you to specify a UNC path via Export/Import screen – this is a known issue that will be fixed in due time, please visit RTFACT-14410 to check whether this was already fixed.

If you are running a version below the fixed version or if the fix is not available yet, there are two ways that will allow you to workaround this limitation.

1.Using the REST API to Export/Import. Using the REST, you can provide the escaped version of the UNC path in the payload JSON. For example, to export, you could run: 

curl -XPOST -uadmin:password http://server_host:8081/artifactory/api/export/system -H "Content-Type: application/json" -T export.json

Where export.json contains a path that looks like this:

  "exportPath" : "\\\share-name"

*Notice that there are 4 preceding slashes, and 2 more slashes between the IP and share name.

2. Using Windows symlinks to symlink a UNC path as a local directory in one of your local drives. This solution is described in this S.O thread as an answer.