Syncing of artifacts from Sonatype Nexus 2.14.11 to Nexus 3.X at sometime interval of time

I am doing automation with CI/CD pipeline in On-Prem Environment. Pls help me in the below scenario:

I have a nexus 2.14.11 in DataCenter1 where developers push all the artifacts (mostly maven and NuGet). And I have a nexus 3.X in DataCenter2 where all of our automation tools are installed (Jenkins and rest of CI/CD tools). I want the artifacts of Nexus2.14.11 to be synced in Nexus 3.X at some intervals. Also in the Sync mechanism, it should be pull from Nexus3.X to Nexus2.14(there is some security concern, that DC1 can’t push the data to DC2, But DC2 can pull from DC1. It’s a bank environment)

PS: The network communication from both DC is established. Both nexus are enterprise version means Nexus PRO. I read something about the Nexus Smart Proxy, will it help in this scenario?

What you describe is achievable by using Nexus Smart Proxy, however Nexus Smart Proxy works only between instances of NXRM2. NXRM3 does not have smart proxy feature. There is no feature in NXRM3 that would periodically pull artefacts from NXRM2. I would suggest setting up a proxy repository in DC2 pointing to your hosted repository DC1, so all needed components would be pulled from there ad hoc.

I would like to advise you to look into updating your NXRM as the version you’re running is known to have security vulnerabilities that we have already patched.

1 Like

Hey Dawid,

Thanks for replying. We took into consideration of using Nexus 3 in both the places. Any idea how we can sync the artifacts between two Nexus 3? I read that Nexus 3 doesn’t have Smart Proxy.

Nexus Repository Manager 3 does not have anything equivalent to Smart Proxy so you’d have to write a script to move artifacts between the two instances. We have added a new feature (for pro customers) to import maven content from 2 to 3 so long as the content is on a filesystem that repository manager has access to. We’ll be adding additional formats as well as the ability to export data in the future. Longer term we’re looking at ways to provide a better replication story but I have no idea when that will happen.

1 Like