# Mongorestore - 502 Bad gateway

**URL:** <https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829>\
**Category:** Community Support\
**Created:** [August 3, 2021, 10:07pm UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829 "2021-08-03T22:07:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluegamma](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bluegamma](https://forums.rocket.chat/u/bluegamma)\
**Post date:** [August 3, 2021, 10:07pm UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/1 "2021-08-03T22:07:39Z")

</div>

### Description

Moving live rocket chat to new url and server. The version has to stay the same due to system change management. The mongorestore looks normal without any errors. But when I start up the docker image for the chat server I get a bad gateway 502.

`#mongorestore --db=rocketchat /var/dump/parties --drop`

I started the server up with docker-compose up and I see this error message:  
error: “Can’t find migration version 226”

### Server Setup Information

- Version of Rocket.Chat Server: 3.14.4
- Operating System: ubuntu
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: ?
- NodeJS Version:
- MongoDB Version: 3.6.14
- Proxy: nginx
- Firewalls involved: no

### Any additional Information

error: “Can’t find migration version 226”

---

<div class="post-metadata">

**Author:** ![john.crisp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/john.crisp/32/2711_2.png) [@john.crisp](https://forums.rocket.chat/u/john.crisp)\
**Post date:** [August 3, 2021, 10:52pm UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/2 "2021-08-03T22:52:48Z")

</div>

> /var/dump/parties

Are you restoring from a snap?

---

<div class="post-metadata">

**Author:** ![bluegamma](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bluegamma](https://forums.rocket.chat/u/bluegamma)\
**Post date:** [August 4, 2021, 3:16am UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/3 "2021-08-04T03:16:40Z")

</div>

I was given a dump. I don’t have any visibility into the source environment. I know my containers are running the same versions.

---

<div class="post-metadata">

**Author:** ![debdut.chakraborty](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/debdut.chakraborty/32/2900_2.png) [@debdut.chakraborty](https://forums.rocket.chat/u/debdut.chakraborty)\
**Post date:** [August 4, 2021, 3:54am UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/4 "2021-08-04T03:54:50Z")

</div>

Hi bluegamma, Good Morning 👋

> [@bluegamma](#):
>
> I know my containers are running the same versions.

I don’t think so. Migration version 226 is for RC version 3.16.x not 3.14.x  
Can you please double check with the source environment administrator?

---

<div class="post-metadata">

**Author:** ![bluegamma](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bluegamma](https://forums.rocket.chat/u/bluegamma)\
**Post date:** [August 4, 2021, 4:05am UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/5 "2021-08-04T04:05:32Z")

</div>

I was sent a message he was on 3.14. I will double check with him again. Could I just up grade to 3.16 to make it work?

---

<div class="post-metadata">

**Author:** ![debdut.chakraborty](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/debdut.chakraborty/32/2900_2.png) [@debdut.chakraborty](https://forums.rocket.chat/u/debdut.chakraborty)\
**Post date:** [August 4, 2021, 4:21am UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/6 "2021-08-04T04:21:09Z")

</div>

> [@bluegamma](#):
>
> Could I just up grade to 3.16 to make it work?

Yes (latest is 3.16.4).

But do keep the backup around, just in case.

---

<div class="post-metadata">

**Author:** ![debdut.chakraborty](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/debdut.chakraborty/32/2900_2.png) [@debdut.chakraborty](https://forums.rocket.chat/u/debdut.chakraborty)\
**Post date:** [August 4, 2021, 4:27am UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/7 "2021-08-04T04:27:54Z")

</div>

> [@bluegamma](#):
>
> I was sent a message he was on 3.14

Uh, since he’s using snap, rc was automatically updated from 3.14.x throughout and he probably didn’t notice.

---

<div class="post-metadata">

**Author:** ![bluegamma](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bluegamma](https://forums.rocket.chat/u/bluegamma)\
**Post date:** [August 4, 2021, 1:14pm UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/8 "2021-08-04T13:14:40Z")

</div>

How can I see what migration version matches to what RC version?

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [August 4, 2021, 1:50pm UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/9 "2021-08-04T13:50:42Z")

</div>

The migrations live here: [Rocket.Chat/server/startup/migrations at master · RocketChat/Rocket.Chat · GitHub](https://github.com/RocketChat/Rocket.Chat/tree/master/server/startup/migrations)

you can change the tag for the corresponding version and see if it exists. Or, you can go to the latest tag (master or latest version), click on the file numbered migration and inspect the pull request to find at what version it was introduce

There are probably some other ways, but this will get the info you want 🙂

---

<div class="post-metadata">

**Author:** ![debdut.chakraborty](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/debdut.chakraborty/32/2900_2.png) [@debdut.chakraborty](https://forums.rocket.chat/u/debdut.chakraborty)\
**Post date:** [August 4, 2021, 4:45pm UTC](https://forums.rocket.chat/t/mongorestore-502-bad-gateway/11829/10 "2021-08-04T16:45:22Z")

</div>

That’s exactly the method I used today 😉

I believe it’d be better to have it documented someplace publicly in the coming future.
