# Combining Nexus

**URL:** https://community.sonatype.com/t/combining-nexus/3327
**Category:** Sonatype Nexus Repository
**Created:** [January 20, 2020, 9:00pm UTC](https://community.sonatype.com/t/combining-nexus/3327 "2020-01-20T21:00:26Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![robert.williams](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@robert.williams](https://community.sonatype.com/u/robert.williams)
#### Post date: [January 20, 2020, 9:00pm UTC](https://community.sonatype.com/t/combining-nexus/3327/1 "2020-01-20T21:00:26Z")

</div>

Hello, for some reason we have 2 installations of Nexus running for storing artifacts. The first is running 2.x.x and the second is running 3.x.x. I need to combine these into one single Nexus. Is there any documentation on how to migrate data from one installation to another? Ultimately, I would like to install the latest version from scratch, and migrate data from the existing two into a new one. Is there any documentation out there, regarding this?

---

<div class="post-metadata">

### Author: ![Joseph](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Joseph](https://community.sonatype.com/u/Joseph)
#### Post date: [January 21, 2020, 2:28pm UTC](https://community.sonatype.com/t/combining-nexus/3327/2 "2020-01-21T14:28:48Z")

</div>

One way could be that you could install a latest version from scratch, then create a proxy to your 2.x.x and 3.x.x.  
Over time, you should get quite a bit of the packages into your new nexus repo.

Otherwise, you probably need to write some script to grab the packages, and upload to the new one? You can also search through the forum, there’s some discussion regarding migrating the data between repos.

---

<div class="post-metadata">

### Author: ![rseddon](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/rseddon/32/341_2.png) [@rseddon](https://community.sonatype.com/u/rseddon)
#### Post date: [January 21, 2020, 4:04pm UTC](https://community.sonatype.com/t/combining-nexus/3327/3 "2020-01-21T16:04:13Z")

</div>

You can use these scripts to import artifacts from Nexus Repo 2 into 3:

> **[GitHub - sonatype-nexus-community/nexus-repository-import-scripts: A few scripts for importing artifacts into Nexus...](https://github.com/sonatype-nexus-community/nexus-repository-import-scripts)**
>
> A few scripts for importing artifacts into Nexus Repository

---

<div class="post-metadata">

### Author: ![robert.williams](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@robert.williams](https://community.sonatype.com/u/robert.williams)
#### Post date: [January 21, 2020, 5:46pm UTC](https://community.sonatype.com/t/combining-nexus/3327/4 "2020-01-21T17:46:07Z")

</div>

Thanks for the suggestion.

---

<div class="post-metadata">

### Author: ![robert.williams](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@robert.williams](https://community.sonatype.com/u/robert.williams)
#### Post date: [January 21, 2020, 5:48pm UTC](https://community.sonatype.com/t/combining-nexus/3327/5 "2020-01-21T17:48:24Z")

</div>

I will check these scripts out, thanks!

---

<div class="post-metadata">

### Author: ![robert.williams](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@robert.williams](https://community.sonatype.com/u/robert.williams)
#### Post date: [August 23, 2020, 12:57am UTC](https://community.sonatype.com/t/combining-nexus/3327/6 "2020-08-23T00:57:27Z")

</div>

@Joseph , I was able to upgrade my 2.x repo to my brand new 3.x. Now I need to get the older 3.x repositories on the new nexus 3.x. We are running the open source version so don’t have access to exporting repositories. At this point I either can use the API or use the proxy as you suggested. If I was to use the proxy setup , how would this look? I currently have a proxy on the server now sending incoming traffic on 8081 to port 80. Would I add another block in the same proxy file or what? Any guidance would be helpful.

Thanks

---

<div class="post-metadata">

### Author: ![Joseph](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Joseph](https://community.sonatype.com/u/Joseph)
#### Post date: [November 20, 2020, 5:15am UTC](https://community.sonatype.com/t/combining-nexus/3327/7 "2020-11-20T05:15:20Z")

</div>

Hi @robert.williams,

I missed this, and hope that everything is working fine for you now.

Proxy in this case, is not about mapping the port.

Let’s say you have two instances of the nexus, 2.x and 3.x, and working on a javascript project (npm)

Your project should pointing to `nexus 3.x` now where your `nexus 3.x` should have a few repository setup.

1. Private repository (if any)
2. Proxy repository to your `nexus 2.x` group repository
3. Proxy repository to official registry (npm, github, etc)

This way, you should be able to fetch from your 2.x to your 3.x and overwrite, should build up enough to retire your 2.x nexus
