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:
We are using Windows 10 & MongoDB 3.2.
Best Answer
As at MongoDB 3.2, there is no option for the Windows MSI to only install the
mongodump.exe
andmongorestore.exe
command line tools so a default install is the most straightforward option.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 havemongoimport.exe
andmongoexport.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
andlibeay32.dll
. The DLLs will need to either be in your path or the same directory as the MongoDB.exe
files you are running.