# Split Nexus 2 maven release repository into several - howto?

**URL:** <https://community.sonatype.com/t/split-nexus-2-maven-release-repository-into-several-howto/5869>\
**Category:** Sonatype Nexus Repository\
**Tags:** nexus-repository\
**Created:** [February 11, 2021, 1:08am UTC](https://community.sonatype.com/t/split-nexus-2-maven-release-repository-into-several-howto/5869 "2021-02-11T01:08:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian.williams1](https://avatars.discourse-cdn.com/v4/letter/i/c89c15/32.png) [@ian.williams1](https://community.sonatype.com/u/ian.williams1)\
**Post date:** [February 11, 2021, 1:08am UTC](https://community.sonatype.com/t/split-nexus-2-maven-release-repository-into-several-howto/5869/1 "2021-02-11T01:08:19Z")

</div>

Running: Nexus Repository Manager OSS 2.14.19-01  
Repository in question: Type: hosted, Format: Maven2, Type: Release

We have an existing hosted Nexus 2 maven (release) repository (one of many) that is a mix of OSS , vendor provided and internally produced artifacts (~6000).

It no longer meets our needs to have that eclectic mix of artifacts. Is there a preferred procedure to export / split the repository and reconfigure without having to reupload all the artifacts? We’d like to be able to preserve the existing historical data (timestamp, uploader). The split will be by GroupID: com.mycorp into one, several vendor groupID into another and the rest would be “OSS”

I have reviewed this article  
[How can I programmatically upload an artifact into Nexus 2?](https://support.sonatype.com/hc/en-us/articles/213465818)  
and [Rebuilding hosted repos from local .m2/repository in nexus3](http://community.sonatype.com/t/rebuilding-hosted-repos-from-local-m2-repository-in-nexus3/335),  
My preference is to retain the upload information (date, user). I don’t believe either option above achieves that.

I have considered this approach:

1. 

```
 Create a new empty repository, properly configured.

```

2. 

```
 Move/Copy over the relevant repository contents at the file system level

```

3. 

```
 Start up and rebuild the indexes?

```

I recall doing something similar when we initially populated the repository in 2012 when we first set it up, but had issues, possibly with the indexing or metadata.

Has anyone used this approach? Success / Fail / lessons learnt? Other approaches?

---

<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:** [February 11, 2021, 4:36pm UTC](https://community.sonatype.com/t/split-nexus-2-maven-release-repository-into-several-howto/5869/2 "2021-02-11T16:36:36Z")

</div>

Be sure to also move over the attributes files for the components you move… you’ll find those under “sonatype-work/nexus/storage//.nexus/attributes/”. After moving the components, follow these instructions:

> **[Can I directly update artifacts in Nexus Repository 2 local storage on disk?](https://support.sonatype.com/hc/en-us/articles/213465608-Can-I-directly-update-artifacts-in-Nexus-Repository-2-local-storage-on-disk)**
>
> Nexus Repository 2 officially sunsetted June 30, 2025. Visit my.sonatype.com for archived documentation. Migrate to Sonatype Nexus Repository 3 as soon as possible.
> In general, it is OK to directly...
