Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1718

duplicate top level key: create

    • Platforms 2017-12-04
    • 2
    • v3.4, v3.2

      from psychmedia (Tony Hirst) on github:

      I have a long standing build script and running it in last few days has started throwing up the following error when I try to restore a db using mongo 3.4.5 on Linux:

      error running create command:
      Parsed command object contains duplicate top level key: create
      

      Command is:

      mkdir -p /tmpdatafiles
      tar xvjf small_accidents.tar.bz2 -C /tmpdatafiles
      mongorestore --drop  --db accidents  /tmpdatafiles/small_accidents
      

      using this datafile:

      ==> default: 2017-06-20T17:07:00.444+0000	building a list of collections to restore from /tmpdatafiles/small_accidents dir
      ==> default: 2017-06-20T17:07:00.444+0000	reading metadata for accidents.accidents from /tmpdatafiles/small_accidents/accidents.metadata.json
      ==> default: 2017-06-20T17:07:00.445+0000	reading metadata for accidents.roads from /tmpdatafiles/small_accidents/roads.metadata.json
      ==> default: 2017-06-20T17:07:00.446+0000	Failed: accidents.accidents: error creating collection accidents.accidents: error running create command: Parsed command object contains duplicate top level key: create
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            william.banfield William Banfield
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: