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

error restoring full dump of the instance

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Problem Statement/Rationale

      I'm trying to restore full backup ( mongodump --gzip --archive ) from old instance.
      Restoring to a new mongodb instance getting (NoSuchKey) Missing expected field "user"

      I want to understand what's this error is all about ? why am I getting this error ?

       

      Can someone explain me what is it trying doing do and what's this error ?

      2023-06-30T11:41:34.912+0000    preparing collections to restore from
      2023-06-30T11:41:34.912+0000    don't know what to do with subdirectory "config", skipping...
      2023-06-30T11:41:34.912+0000    don't know what to do with subdirectory "dummy", skipping...
      2023-06-30T11:41:34.912+0000    don't know what to do with subdirectory "", skipping...
      2023-06-30T11:41:34.912+0000    don't know what to do with subdirectory "admin", skipping...
      2023-06-30T11:41:34.920+0000    reading metadata for config.settings from archive '/mnt/tmp/archive.gz'
      2023-06-30T11:41:34.920+0000    reading metadata for dummy.abc from archive '/mnt/tmp/archive.gz'
      2023-06-30T11:41:34.921+0000    dropping collection config.settings before restoring
      2023-06-30T11:41:34.937+0000    restoring config.settings from archive '/mnt/tmp/archive.gz'
      2023-06-30T11:41:34.948+0000    finished restoring config.settings (1 document, 0 failures)
      2023-06-30T11:41:34.962+0000    restoring dummy.abc from archive '/mnt/tmp/archive.gz'
      2023-06-30T11:41:34.990+0000    finished restoring dummy.abc (39 documents, 0 failures)
      2023-06-30T11:41:34.990+0000    restoring users from archive '/mnt/tmp/archive.gz'
      2023-06-30T11:41:35.013+0000    restoring roles from archive '/mnt/tmp/archive.gz'
      2023-06-30T11:41:35.045+0000    Failed: restore error: error running merge command: (NoSuchKey) Missing expected field "user"
      2023-06-30T11:41:35.045+0000    40 document(s) restored successfully. 0 document(s) failed to restore.

      Steps to Reproduce

      mongorestore -u user -p pass --host=${target_vip} --authenticationDatabase=admin --drop --ssl --oplogReplay --gzip --archive=/mnt/tmp

      Expected Results

      status code 0 and also it should be restoring the oplog after full restore.

      Actual Results

      restores only full and fails without restoring oplogs.

      Additional Notes

      Any additional information that may be useful to include.

            Assignee:
            tim.fogarty@mongodb.com Tim Fogarty
            Reporter:
            bharath_achar@outlook.com Bharath Kumar CM
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: