# Migration

**URL:** <https://community.sonatype.com/t/migration/7267>\
**Category:** Best Practices\
**Tags:** nexus-repository\
**Created:** [September 9, 2021, 5:53pm UTC](https://community.sonatype.com/t/migration/7267 "2021-09-09T17:53:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![schollii](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@schollii](https://community.sonatype.com/u/schollii)\
**Post date:** [September 9, 2021, 5:53pm UTC](https://community.sonatype.com/t/migration/7267/1 "2021-09-09T17:53:48Z")

</div>

Hi everyone, I have Nexus Repository OSS installed in a kubernetes cluster, and setup to save artifacts in S3. I need to setup a new Nexus instance, and after a couple of days tear down the current Nexus. My question is, will having 2 Nexus pointing to the same S3 bucket mess anything up (corrupt indexes, whatever)?

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [September 9, 2021, 7:54pm UTC](https://community.sonatype.com/t/migration/7267/2 "2021-09-09T19:54:40Z")

</div>

Yes, Nexus may delete files which are not referenced in the database.

If you were starting from new when creating the s3 blobstores you could utilize the _prefix_ option with distinct values for each instance, however that cannot be changed once the blobstore has been created.

---

<div class="post-metadata">

**Author:** ![schollii](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@schollii](https://community.sonatype.com/u/schollii)\
**Post date:** [September 9, 2021, 10:10pm UTC](https://community.sonatype.com/t/migration/7267/3 "2021-09-09T22:10:26Z")

</div>

Thanks for the info.

I guess I have two options:

- ensure the current Nexus is not running before standing up the new one
- make the new Nexus use a new S3 bucket (which I copy from the current bucket perhaps via replication)

---

<div class="post-metadata">

**Author:** ![mmartz](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@mmartz](https://community.sonatype.com/u/mmartz)\
**Post date:** [September 10, 2021, 1:05pm UTC](https://community.sonatype.com/t/migration/7267/4 "2021-09-10T13:05:46Z")

</div>

If replication will work in your case I think that would probably be ideal since the new instance would continue to get any new hosted artifacts while the old one was still running. If you do end up going that route would you be interested in providing us feedback on your experience?

---

<div class="post-metadata">

**Author:** ![schollii](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@schollii](https://community.sonatype.com/u/schollii)\
**Post date:** [September 10, 2021, 3:20pm UTC](https://community.sonatype.com/t/migration/7267/5 "2021-09-10T15:20:11Z")

</div>

Exactly, that’s what I did and looks like data all copied (took 2.5 hours for 750 GB). I will be doing the switchover sometime next week, I will post update.

---

<div class="post-metadata">

**Author:** ![mmartz](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@mmartz](https://community.sonatype.com/u/mmartz)\
**Post date:** [September 10, 2021, 4:13pm UTC](https://community.sonatype.com/t/migration/7267/6 "2021-09-10T16:13:04Z")

</div>

I just realized you must be talking about some aws s3 replication feature. I was thinking about our new pro replication feature. Those are very different things and the aws one probably won’t do what you want? The new instance won’t know what the blobs are for. I think you can run the restore from blobstore task so long as your repositories are named the same and you might get your content back.

---

<div class="post-metadata">

**Author:** ![mprescott](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/mprescott/32/178_2.png) [@mprescott](https://community.sonatype.com/u/mprescott)\
**Post date:** [September 10, 2021, 4:15pm UTC](https://community.sonatype.com/t/migration/7267/7 "2021-09-10T16:15:07Z")

</div>

I think there might be a terminology clash. @mmartz was referring to a Repository Pro feature called Repository Replication that’s meant for proactive mirroring of hosted repositories. That’s different from S3 bucket replication.

S3 bucket replication will move all the binaries across, but unless you have a corresponding metadata database, your new instance of Nexus Repo won’t have indexed those binaries and they’ll be orphaned. As I see @mmartz just said in his new reply, you can use a scheduled task to repair inconsistencies, indexing those orphaned binaries.
