mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-29 08:52:32 +03:00
Merge pull request #888 from whalehub/patch-1
Fix mongodump command syntax
This commit is contained in:
commit
c404787f2c
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