mongorestore Failed: no reachable servers

后端 未结 12 1710
天涯浪人
天涯浪人 2020-12-15 03:06

I tried to restore mongo from dump but failed:

mongorestore --port 27133 dump
2015-05-07T09:39:11.760+0300    Failed: no reachable servers

12条回答
  •  时光说笑
    2020-12-15 03:33

    First run mongod

    If you get exception exception in initAndListen: 29 Data directory /data/db not found., terminating, do sudo mkdir -p /data/db

    If you get expection exception in initAndListen: 98 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating, This probably you have the permission issue. If this is your local, you can run sudo chmod 7777 /data/db to fix the issue.

    Now, mongod should work. Then, run mongorestore dump where your dump file is.

    You should successfully restore the dump file.

提交回复
热议问题