From 6343705ac54ba9fc75ead8fbc7bff1e0ba84f171 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 28 Feb 2020 10:37:50 -0800 Subject: [PATCH] Fixed server exception within performBackup() --- db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db.js b/db.js index b79b87f6..cdf30418 100644 --- a/db.js +++ b/db.js @@ -1236,7 +1236,7 @@ module.exports.CreateDB = function (parent, func) { var mongoDumpPath = 'mongodump'; if (parent.config.settings.autobackup && parent.config.settings.autobackup.mongodumppath) { mongoDumpPath = parent.config.settings.autobackup.mongodumppath; } const child_process = require('child_process'); - const cmd = '\"' + mongoDumpPath + '\" --db=\"' + dbname + '\" --archive=\"' + newBackupPath + '.archive\"'; + var cmd = '\"' + mongoDumpPath + '\" --db=\"' + dbname + '\" --archive=\"' + newBackupPath + '.archive\"'; if (dburl) { cmd = '\"' + mongoDumpPath + '\" --uri=\"' + dburl + '\" --archive=\"' + newBackupPath + '.archive\"'; } var backupProcess = child_process.exec(cmd, { cwd: backupPath }, function (error, stdout, stderr) { try {