mongodump to dev null for dry-run effect
Noah Zalev committed
Apr 10, 2021 at 14:23 UTC
b0579baa8555ade82be7ba6a11ebbac82b4c0c64
1 file changed
+1
db.js
+1
@@ -1595,6 +1595,7 @@ module.exports.CreateDB = function (parent, func) {
1595
if (parent.config.settings.autobackup && parent.config.settings.autobackup.mongodumppath) { mongoDumpPath = parent.config.settings.autobackup.mongodumppath; }
1596
var cmd = '"' + mongoDumpPath + '"';
1597
if (dburl) { cmd = '\"' + mongoDumpPath + '\" --uri=\"' + dburl.replace('?', '/?') + '\"'; }
1598
+ cmd += (parent.platform == 'win32') ? ' --archive=\"nul\"' : ' --archive=\"/dev/null\"';
1599
const child_process = require('child_process');
1600
child_process.exec(cmd, { cwd: backupPath }, function (error, stdout, stderr) {
1601
try {