# \[SOLVED: mongo dump/restore is easier\] Migrating (Docker): error Got signal: 11

**URL:** <https://forums.rocket.chat/t/solved-mongo-dump-restore-is-easier-migrating-docker-error-got-signal-11/11281>\
**Category:** Community Support\
**Created:** [May 29, 2021, 8:24am UTC](https://forums.rocket.chat/t/solved-mongo-dump-restore-is-easier-migrating-docker-error-got-signal-11/11281 "2021-05-29T08:24:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aerya](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Aerya](https://forums.rocket.chat/u/Aerya)\
**Post date:** [May 29, 2021, 8:24am UTC](https://forums.rocket.chat/t/solved-mongo-dump-restore-is-easier-migrating-docker-error-got-signal-11/11281/1 "2021-05-29T08:24:28Z")

</div>

Hello,

### Description

I use RC with your provided docker-compose.yml: [https://github.com/RocketChat/Rocket.Chat/blob/develop/docker-compose.yml](https://github.com/RocketChat/Rocket.Chat/blob/develop/docker-compose.yml)  
I wanted to migrate to another dedicated server, so I just copy/paste my /docker/rocketchat folder with data and docker-compose but I got a Mongo error when running it.

My docker-compose:  
version: ‘2’

```
services:
  rocketchat:
    image: rocketchat/rocket.chat:latest
    command: >
      bash -c
        "for i in `seq 1 30`; do
          node main.js &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    restart: always
    volumes:
      - /home/aerya/docker/rocketchatUAC/chat/uploads:/app/uploads
    environment:
      - PORT=3000
      - ROOT_URL=http://0.0.0.0:3000
      - MONGO_URL=mongodb://mongo:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
      - MAIL_URL=xxx
    depends_on:
      - mongo
    ports:
      - 3000:3000
    labels:
      - com.centurylinklabs.watchtower.enable=true

  mongo:
    image: mongo:4.0
    restart: always
    volumes:
     - /home/aerya/docker/rocketchatUAC/data/db:/data/db
    command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1

  mongo-init-replica:
    image: mongo:4.0
    command: >
      bash -c
        "for i in `seq 1 30`; do
          mongo mongo/rocketchat --eval \"
            rs.initiate({
              _id: 'rs0',
              members: [{ _id: 0, host: 'localhost:27017' }]})\" &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    depends_on:
      - mongo

```

Mongo logs:  
[https://pastebin.com/f1UsLHWt](https://pastebin.com/f1UsLHWt)

I don’t understand this error because everything is exactly the same except IPv4/6 which doesn’t matter here.

### Server Setup Information

Not related

---

<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:** [May 29, 2021, 10:46am UTC](https://forums.rocket.chat/t/solved-mongo-dump-restore-is-easier-migrating-docker-error-got-signal-11/11281/2 "2021-05-29T10:46:59Z")

</div>

Hmmm.

So I think that somewhere we’re probably missing some info.

We have this:

> 021-05-29T08:18:30.563+0000 I REPL [initandlisten] Recovering from an unstable checkpoint (top of oplog: { ts: Timestamp(1622273765, 2), t: 15 }, appliedThrough: { ts: Timestamp(1622273765, 2), t: 15 })

> 2021-05-29T08:18:30.563+0000 I REPL [initandlisten] Starting recovery oplog application at the appliedThrough: { ts: Timestamp(1622273765, 2), t: 15 }, through the top of the oplog: { ts: Timestamp(1622273765, 2), t: 15 }

> 2021-05-29T08:18:30.563+0000 I REPL [initandlisten] No oplog entries to apply for recovery. Start point is at the top of the oplog.

> 2021-05-29T08:18:30.569+0000 I REPL [replexec-0] New replica set config in use: { \_id: “rs0”,

And then this which seems to indicate the DB is not up:

> NETWORK [LogicalSessionCacheRefresh] Unable to reach primary for set rs0

I’d also think perhaps you ought to think about migrating to wiredTiger - it might be easier to do a proper dump backup/restore rather than trying to copy which may leave other settings buried somewhere.

---

<div class="post-metadata">

**Author:** ![Aerya](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Aerya](https://forums.rocket.chat/u/Aerya)\
**Post date:** [May 29, 2021, 11:08am UTC](https://forums.rocket.chat/t/solved-mongo-dump-restore-is-easier-migrating-docker-error-got-signal-11/11281/3 "2021-05-29T11:08:07Z")

</div>

Thanks for last advice. I used mongodump/restore to make it through.  
It’s not really solved but I could go on.

---

<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:** [May 29, 2021, 11:09am UTC](https://forums.rocket.chat/t/solved-mongo-dump-restore-is-easier-migrating-docker-error-got-signal-11/11281/4 "2021-05-29T11:09:50Z")

</div>

> [@Aerya](#):
>
> Thanks for last advice. I used mongodump/restore to make it through.

OK.

> [@](#):
>
> It’s not really solved but I could go on.

I suggest you solve any issues now…

---

<div class="post-metadata">

**Author:** ![Aerya](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Aerya](https://forums.rocket.chat/u/Aerya)\
**Post date:** [May 29, 2021, 11:12am UTC](https://forums.rocket.chat/t/solved-mongo-dump-restore-is-easier-migrating-docker-error-got-signal-11/11281/5 "2021-05-29T11:12:31Z")

</div>

Hope you didn’t misunderstand me meaning _it’s not really solved_. I was talking about the cp/rsync/mv that should have worked “out of the box”.  
I’m glad to be able to use RC again on my new server.

---

<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:** [May 29, 2021, 11:15am UTC](https://forums.rocket.chat/t/solved-mongo-dump-restore-is-easier-migrating-docker-error-got-signal-11/11281/6 "2021-05-29T11:15:26Z")

</div>

Ah OK.

The copy issue is down to your OS/docker, not Rocket.

Glad it is working.
