All,
Is there a system wide setting to specify the dump folder in MongoDB? I went through this link and couldn't find any.
Basically, I want C:\MongoDB\dump to be the folder where all backups are created. Currently, a dump folder is created in the folder mongodump is executed in or one has to specify a folder explicitly using --out parameter as a part of mongodump.
Instead, wherever I may execute mongodump from, I want the dumps to be always created in C:\MongoDB\dump
Thanks, rgn
If you do not specify the
--out
paramater to themongodump
, it will create adump
directory in the current directory to store the database dump.You can set a system level parameter for the base directory for all of your dumps. However, for every
mongodump
you take you will have to pass the --out parameter to uniquely identify that dump.Failing to do so will overwrite the existing dumps within your base dump directory