From b0579baa8555ade82be7ba6a11ebbac82b4c0c64 Mon Sep 17 00:00:00 2001 From: Noah Zalev Date: Sat, 10 Apr 2021 14:23:07 -0400 Subject: [PATCH] mongodump to dev null for dry-run effect --- db.js | 1 + 1 file changed, 1 insertion(+) diff --git a/db.js b/db.js index bf92e090..1062e287 100644 --- a/db.js +++ b/db.js @@ -1595,6 +1595,7 @@ module.exports.CreateDB = function (parent, func) { if (parent.config.settings.autobackup && parent.config.settings.autobackup.mongodumppath) { mongoDumpPath = parent.config.settings.autobackup.mongodumppath; } var cmd = '"' + mongoDumpPath + '"'; if (dburl) { cmd = '\"' + mongoDumpPath + '\" --uri=\"' + dburl.replace('?', '/?') + '\"'; } + cmd += (parent.platform == 'win32') ? ' --archive=\"nul\"' : ' --archive=\"/dev/null\"'; const child_process = require('child_process'); child_process.exec(cmd, { cwd: backupPath }, function (error, stdout, stderr) { try {