# Upgrading Mender Server from 2.0 to 2.1

**URL:** <https://hub.mender.io/t/upgrading-mender-server-from-2-0-to-2-1/1103>\
**Category:** General Discussions\
**Created:** [October 4, 2019, 1:34pm UTC](https://hub.mender.io/t/upgrading-mender-server-from-2-0-to-2-1/1103 "2019-10-04T13:34:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://hub.mender.io/u/martin)\
**Post date:** [October 4, 2019, 1:34pm UTC](https://hub.mender.io/t/upgrading-mender-server-from-2-0-to-2-1/1103/1 "2019-10-04T13:34:02Z")

</div>

Hi,

I’m having a few problems upgrading my mender server from 2.0 to 2.1. First the instructions say

“run the `migrate-db` script from migration directory.”

So I tried that and got:  
/mender-server/migration$ ./migrate-db  
./migrate-db: line 30: ./run: No such file or directory

So I tried running it from the production directory which contains the run script:

/mender-server/production$ …/migration/migrate-db  
Stopping menderproduction\_mender-device-auth\_1 … done  
Stopping menderproduction\_mender-useradm\_1 … done  
Stopping menderproduction\_mender-deployments\_1 … done  
Stopping menderproduction\_mender-inventory\_1 … done  
menderproduction\_mender-mongo\_1 is up-to-date  
2019-10-04T13:28:29.616+0000 Failed: mongorestore target ‘/srv/db-dump/mender-mongo-useradm’ invalid: stat /srv/db-dump/mender-mongo-useradm: no such file or directory  
2019-10-04T13:28:29.696+0000 Failed: mongorestore target ‘/srv/db-dump/mender-mongo-inventory’ invalid: stat /srv/db-dump/mender-mongo-inventory: no such file or directory  
2019-10-04T13:28:29.733+0000 Failed: mongorestore target ‘/srv/db-dump/mender-mongo-device-auth’ invalid: stat /srv/db-dump/mender-mongo-device-auth: no such file or directory  
2019-10-04T13:28:29.755+0000 Failed: mongorestore target ‘/srv/db-dump/mender-mongo-deployments’ invalid: stat /srv/db-dump/mender-mongo-deployments: no such file or directory

And I get some failures.

Should I be worried about these?

Cheers,  
Martin.

---

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://hub.mender.io/u/martin)\
**Post date:** [October 4, 2019, 2:12pm UTC](https://hub.mender.io/t/upgrading-mender-server-from-2-0-to-2-1/1103/2 "2019-10-04T14:12:58Z")

</div>

I pushed on and tried the next step the git merge  
rufilla@server5:~/projects/voestalpine/mender-server/production$ git merge 2.1.0  
Removing update  
Removing up  
Removing stop  
Removing reset  
Auto-merging other-components.yml  
CONFLICT (content): Merge conflict in other-components.yml  
Auto-merging extra/release\_tool.py  
CONFLICT (content): Merge conflict in extra/release\_tool.py  
Auto-merging docker-compose.yml  
CONFLICT (content): Merge conflict in docker-compose.yml  
Removing docker-compose.mt.yml  
Auto-merging docker-compose.enterprise.yml  
CONFLICT (content): Merge conflict in docker-compose.enterprise.yml  
Auto-merging docker-compose.docker-client.yml  
CONFLICT (content): Merge conflict in docker-compose.docker-client.yml  
Auto-merging docker-compose.client.yml  
CONFLICT (content): Merge conflict in docker-compose.client.yml  
Automatic merge failed; fix conflicts and then commit the result.

Have I done something wrong? I thought this would update to the 2.1.0 tag?

Cheers,  
Martin.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [October 4, 2019, 6:40pm UTC](https://hub.mender.io/t/upgrading-mender-server-from-2-0-to-2-1/1103/3 "2019-10-04T18:40:09Z")

</div>

Hi @martin it seems you have some local changes to those files. I’m not sure why else “git merge” would be detecting a conflict. Have you viewed the mentioned files to see what areas are flagged as conflicts?

---

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://hub.mender.io/u/martin)\
**Post date:** [October 7, 2019, 3:47pm UTC](https://hub.mender.io/t/upgrading-mender-server-from-2-0-to-2-1/1103/4 "2019-10-07T15:47:12Z")

</div>

Hi Drew,

The local changes are the ones made that are described in the production server setup instructions. As far as I know I have touched any of the files listed.

Here are some of the conflicts. Let me know if you want all of them.

```
docker-compose.client.yml:

version: '2'

services:

    #

    # mender-client

    #

    mender-client:

<<<<<<< HEAD

        image: mendersoftware/mender-client-qemu:2.0.1

=======

        image: mendersoftware/mender-client-qemu:2.1.0

>>>>>>> 2.1.0

        networks:

            - mender

        stdin_open: true

        tty: true

        privileged: true

docker-compose.docker-client.yml:

version: '2'

services:

    mender-client:

        # Needs to be built in mender client's test directory.

<<<<<<< HEAD

        image: mendersoftware/mender-client-docker:2.0.1

=======

        image: mendersoftware/mender-client-docker:2.1.0

>>>>>>> 2.1.0

        networks:

            - mender

docker-compose.enterprise.yml:

<<<<<<< HEAD:docker-compose.tenant.yml

    mender-mongo:

        networks:

            mender:

                aliases:

                    - mongo-tenantadm

                    - mongo-deployments

                    - mongo-device-auth

                    - mongo-inventory

                    - mongo-useradm

    mender-conductor:

        image: mendersoftware/mender-conductor-enterprise:1.3.1

=======

        environment:

            TENANTADM_CONDUCTOR_ADDR: http://mender-conductor:8080

>>>>>>> 2.1.0:docker-compose.enterprise.yml

....

<<<<<<< HEAD:docker-compose.tenant.yml

        image: mendersoftware/email-sender:1.3.1

=======

        image: mendersoftware/email-sender:1.4.0

>>>>>>> 2.1.0:docker-compose.enterprise.yml

```

Cheers,  
Martin

---

<div class="post-metadata">

**Author:** ![dYalib](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dyalib/32/1241_2.png) [@dYalib](https://hub.mender.io/u/dYalib)\
**Post date:** [October 8, 2019, 11:26am UTC](https://hub.mender.io/t/upgrading-mender-server-from-2-0-to-2-1/1103/5 "2019-10-08T11:26:16Z")

</div>

I am facing the same issue as @martin. I try to migrate from version 2.0 (installed as described in the doku) to 2.1 too.

First, I execute “dump-db” without any errors, then i execute “migrate-db” and get the same errors as @martin mention in his first post.

I also get the merge conflict, but I haven’t changed the corresponding files either…  
I just fixed it the hard way: “git merge 2.1.0 --strategy-option theirs”. But maybe this isn’ t the best way…

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [October 8, 2019, 4:46pm UTC](https://hub.mender.io/t/upgrading-mender-server-from-2-0-to-2-1/1103/6 "2019-10-08T16:46:44Z")

</div>

Given the conflicts posted above, I think using the “git merge 2.1.0 --strategy-option theirs” command is the best approach.
