search

Home  >  Q&A  >  body text

mongodb备份报错 too many positional options

目的是想备份整个项目的全部数据,不限于某一个collection

使用的命令:
mongoexport —db Demo —out demo_backup.json

运行后报错:
Error parsing command line: too many positional options

求各位大神帮忙

怪我咯怪我咯2847 days ago1741

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-24 09:15:54

    I solved this problem by removing the spaces between the fields to be exported after the -f parameter. Then it's fine.

    reply
    0
  • 高洛峰

    高洛峰2017-04-24 09:15:54

    Found the answer on stack overflow
    mongodump -d Demo -o demo_backup.json

    http://stackoverflow.com/questions/7521163/what-does-too-many-positional-options-mean-when-doing-a-mongoexport

    I don’t know how to solve the problem if I continue to use mongoexport

    reply
    0
  • Cancelreply