mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 22:55:52 -05:00
Fix mongodump command syntax
This commit is contained in:
parent
02217b5032
commit
a7ceabafc1
4
db.js
4
db.js
@ -987,7 +987,7 @@ module.exports.CreateDB = function (parent, func) {
|
||||
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\"';
|
||||
if (dburl) { cmd = '\"' + mongoDumpPath + '\" --url=\"' + dburl + '\" --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 {
|
||||
backupProcess = null;
|
||||
@ -1125,4 +1125,4 @@ module.exports.CreateDB = function (parent, func) {
|
||||
}
|
||||
|
||||
return obj;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user