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

MongoRestore does not restore archive backups to a database with a different name than the original database

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: mongodump, mongorestore
    • Labels:
      None

      This morning I found a problem using MongoRestore 3.2.4 (Windows 64-bit binaries)

      When I try to restore an archive dump from a database called BOB to a database called BOB_TEST (on the same server), MongoRestore doesn't do anything and the only output I get is:

      2016-03-16T14:51:23.216-0500 setting number of parallel collections to number of parallel collections in archive (6)
      2016-03-16T14:51:23.228-0500 creating intents for archive
      2016-03-16T14:51:23.314-0500 done

      However, it works if I try to restore from the dump files generated to a folder.

      In other words, the following works:
      1) mongodump /host:xxx /port:yyy /username:user /password:pass /authenticationDatabase:admin /db:BAB /out:d:\mongo
      2) mongorestore /host:yyy /port:yyy /username:user /password:pass /authenticationDatabase:admin /db:BAB2 /drop /dir:\mongo\BAB

      ...but the following does not:
      1) mongodump /host:xxx /port:yyy /username:user /password:pass /authenticationDatabase:admin /db:BOB /archive:d:\mongo\BOB.mongodb-dump
      2) mongorestore /host:yyy /port:yyy /username:user /password:pass /authenticationDatabase:admin /db:BOB_TEST /drop /archive:d:\mongo\BOB.mongodb-dump

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            jgordillo@colspace.com Jeffrey Gordillo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: