add Postgres backup errors to debug output (#7405)
stephannn committed
May 16, 2026 at 18:48 UTC
3d02630f3449f8812755e938958a76a48dcc74c1
1 file changed
+21
db.js
+21
@@ -3464,6 +3464,13 @@ module.exports.CreateDB = function (parent, func) {
3464
child_process.exec(cmd, { cwd: backupPath }, function (error, stdout, stderr) {
3465
if ((error != null) && (error != '')) {
3466
func(1, "Mongodump error, backup will not be performed. Check path or use mongodumppath & mongodumpargs");
3467
+
3468
+ let processedError = error;
3469
+ if (typeof parent?.config?.settings?.postgres?.password === "string" && parent.config.settings.postgres.password.length > 0) {
3470
+ processedError = encodeURIComponent(processedError.replaceAll(parent.config.settings.postgres.password, "****"));
3471
+ }
3472
+ parent.debug('backup', 'MongoDB/MongoJS DumpTool: ' + processedError);
3473
+
3474
return;
3475
} else {parent.config.settings.autobackup.backupintervalhours = backupInterval;}
3476
});
@@ -3475,6 +3482,13 @@ module.exports.CreateDB = function (parent, func) {
3482
child_process.exec(cmd, { cwd: backupPath, timeout: 1000*30 }, function(error, stdout, stdin) {
3483
if ((error != null) && (error != '')) {
3484
func(1, "mysqldump error, backup will not be performed. Check path or use mysqldumppath");
3485
+
3486
+ let processedError = error;
3487
+ if (typeof parent?.config?.settings?.postgres?.password === "string" && parent.config.settings.postgres.password.length > 0) {
3488
+ processedError = encodeURIComponent(processedError.replaceAll(parent.config.settings.postgres.password, "****"));
3489
+ }
3490
+ parent.debug('backup', 'MariaDB/MySQL DumpTool: ' + processedError);
3491
+
3492
return;
3493
} else {parent.config.settings.autobackup.backupintervalhours = backupInterval;}
3494
@@ -3490,6 +3504,13 @@ module.exports.CreateDB = function (parent, func) {
3504
child_process.exec(cmd, { cwd: backupPath }, function(error, stdout, stdin) {
3505
if ((error != null) && (error != '')) {
3506
func(1, "pg_dump error, backup will not be performed. Check path or use pgdumppath.");
3507
+
3508
+ let processedError = error;
3509
+ if (typeof parent?.config?.settings?.postgres?.password === "string" && parent.config.settings.postgres.password.length > 0) {
3510
+ processedError = encodeURIComponent(processedError.replaceAll(parent.config.settings.postgres.password, "****"));
3511
+ }
3512
+ parent.debug('backup', 'PostgreSQL DumpTool: ' + processedError);
3513
+
3514
return;
3515
} else {parent.config.settings.autobackup.backupintervalhours = backupInterval;}
3516
});