Fixed server exception within performBackup()
Ylian Saint-Hilaire committed
Feb 28, 2020 at 10:37 UTC
fa929b3467923a507713a6a1eb189db12e3891ad
1 file changed
+1
-1
db.js
+1
-1
@@ -1236,7 +1236,7 @@ module.exports.CreateDB = function (parent, func) {
1236
var mongoDumpPath = 'mongodump';
1237
if (parent.config.settings.autobackup && parent.config.settings.autobackup.mongodumppath) { mongoDumpPath = parent.config.settings.autobackup.mongodumppath; }
1238
const child_process = require('child_process');
1239
- const cmd = '\"' + mongoDumpPath + '\" --db=\"' + dbname + '\" --archive=\"' + newBackupPath + '.archive\"';
1239
+ var cmd = '\"' + mongoDumpPath + '\" --db=\"' + dbname + '\" --archive=\"' + newBackupPath + '.archive\"';
1240
if (dburl) { cmd = '\"' + mongoDumpPath + '\" --uri=\"' + dburl + '\" --archive=\"' + newBackupPath + '.archive\"'; }
1241
var backupProcess = child_process.exec(cmd, { cwd: backupPath }, function (error, stdout, stderr) {
1242
try {