Fixed server exception within performBackup()
This commit is contained in:
parent
cb38a2dbfa
commit
6343705ac5
2
db.js
2
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 {
|
||||
|
|
Loading…
Reference in New Issue