# Migrating to 3.71 on a docker-based installation

**URL:** <https://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045>\
**Category:** Sonatype Nexus Repository\
**Tags:** help, docker, nexus-repository, upgrade\
**Created:** [August 13, 2024, 3:52pm UTC](https://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045 "2024-08-13T15:52:52Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mbender](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/mbender/32/3577_2.png) [@mbender](https://community.sonatype.com/u/mbender)\
**Post date:** [August 14, 2024, 6:35pm UTC](https://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045/5 "2024-08-14T18:35:08Z")

</div>

OK, I’ve managed to resolve this.

Here are the steps I took:

1. Create a database backup via Nexus tasks as normal; take the Nexus docker container offline
2. copy the db backup to my local Windows machine (for me, personally, this was easier to work with than an endless string of console windows via docker and a Linux docker host)  
The copy process is up to the reader to figure out - in my case my docker-based Nexus deployment was using a mounted drive, so it was easy (i.e. the backup was directly on my docker host drive and I could just copy it using WinSCP)
3. download the migrator utility from [3.70.x Downloads (for OrientDB)](https://help.sonatype.com/en/orientdb-downloads.html)
4. create another copy (just in case) of the database backup and run `java -Xmx16G -Xms16G -XX:+UseG1GC -XX:MaxDirectMemorySize=28672M \ -jar nexus-db-migrator-*.jar \ --migration_type=h2` (modify as required for whichever shell is used; for Powershell I had to specify the `jar` file using a `./<filename>` format)  
Note that I’ve got following regular Java installation from Oracle (for Windows):

```auto
openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)

```

1. the migrator will create a `nexus.mv.db` file in the backup directory; only this file is required!
2. clear out the existing `db` folder on the docker-mapped Nexus drive, and place the new `nexus.mv.db` file there
3. make sure to set the permissions for the `nexus.mv.db` file to match everything else! In my case I had to set `chmod 200:200 nexus.mv.db`, but this is dependant on how the docker Nexus drive is configured
4. if no database changes were made to the docker-based `nexus.properties` file, then do NOT make any modifications to this file ( **_contrary_ to the instruction set from** [Migrating to a New Database](https://help.sonatype.com/en/migrating-to-a-new-database.html))
5. update the Nexus docker container definition to use the new `sonatype/nexus3:3.71.0-ubi` image (`latest` would probably work as well, but I’d rather keep this guide relevant “here and now”)
6. Start your docker-based Nexus instance

The instance should recognize the new database file and update it accordingly to `3.71.*`.

EDIT: A DB migrated this way has some issues; see resolution [in the following response](http://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045/7).

---

_[View the full topic](https://community.sonatype.com/t/migrating-to-3-71-on-a-docker-based-installation/13045)._
