0

We plan to have our build server perform a backup (mongodump) from our Production environment and restore it (mongorestore) to the Test environment for each new release to Test.

Are there mongodump and mongorestore standalone tools that one could use for this or is it best to install the entire MongoDB package on our build server (which feels like an overkill)?

Executing mongodump without the full MongoDB installation:

enter image description here

We are using Windows 10 & MongoDB 3.2.

4
  • What are your versions of MongoDB and O/S? If you are using Linux there should be separate packages available for installing the tools (eg mongodb-org-tools). If you want to be more minimalist you can also just copy the mongodump and mongorestore binaries rather than installing all of the command-line tools (the tools package will also include mongoimport, mongostat, etc).
    – Stennie
    Commented Jul 11, 2016 at 11:49
  • Windows 10 & MongoDB 3.2. Post edited. We could just copy the executables directly. I didn't realise that these could run standalone.
    – Dave New
    Commented Jul 11, 2016 at 12:29
  • @Stennie: Running mongodump standalone doesn't seem to work without MongoDB being installed.
    – Dave New
    Commented Jul 11, 2016 at 12:38
  • For MongoDB 3.2 & Windows you'll need the SSL DLLs which can be found in the MongoDB bin folder if you installed via the MSI: ssleay32.dll and libeay32.dll will need to either be in your path or the same directory as mongodump.exe and mongorestore.exe.
    – Stennie
    Commented Jul 11, 2016 at 12:42

2 Answers 2

2

As at MongoDB 3.2, there is no option for the Windows MSI to only install the mongodump.exe and mongorestore.exe command line tools so a default install is the most straightforward option.

Are there mongodump and mongorestore standalone tools that one could use for this or is it best to install the entire MongoDB package on our build server (which feels like an overkill)?

If you install from a standard (non-Administrator) command prompt, the installer will not be able to create a Windows Service definition so the only overhead will be some extra binary files. In this case you can also use the MSI installer to uninstall or upgrade to newer versions of MongoDB. You will also have additional command line tools available if you want to monitor a deployment (mongostat.exe, mongotop.exe) while you are backup/restoring, and will have mongoimport.exe and mongoexport.exe if you want to import/export JSON or delimited text.

If you want a more minimal install only including specific binaries, you can copy the binaries and the two OpenSSL DLLs which can be found in the bin directory of a full install of MongoDB: ssleay32.dll and libeay32.dll. The DLLs will need to either be in your path or the same directory as the MongoDB .exe files you are running.

1

You can find those tools in ZIP archive if you download it instead of MSI package of MongoDB. No installation required in that case. It is official Mongo software https://www.mongodb.com/download-center/community. Select "MongoDB Community Server" and Package "ZIP"

3
  • 1
    Your answer has been flagged as low-quality because of its length and content. Please try to improve it by adding more information. Can this tools be used without installing anything else? Where this ZIP archive can be download, etc
    – McNets
    Commented Jan 5, 2019 at 10:12
  • Thanks for downvoting, I've updated my previous comment
    – lead
    Commented Jan 6, 2019 at 11:06
  • Right now is not possible to pursue this way since the instructions of downloading lead to a 404 into the mongodb.com site
    – Thecave3
    Commented Jul 9, 2020 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.