Merge pull request #1827 from Dokploy/fix/backups-shell

Update backup command execution to use bash shell in multiple backup …
This commit is contained in:
Mauricio Siu
2025-05-05 02:54:10 -06:00
committed by GitHub
4 changed files with 12 additions and 4 deletions

View File

@@ -38,7 +38,9 @@ export const runComposeBackup = async (
if (compose.serverId) { if (compose.serverId) {
await execAsyncRemote(compose.serverId, backupCommand); await execAsyncRemote(compose.serverId, backupCommand);
} else { } else {
await execAsync(backupCommand); await execAsync(backupCommand, {
shell: "/bin/bash",
});
} }
await sendDatabaseBackupNotifications({ await sendDatabaseBackupNotifications({

View File

@@ -37,7 +37,9 @@ export const runMariadbBackup = async (
if (mariadb.serverId) { if (mariadb.serverId) {
await execAsyncRemote(mariadb.serverId, backupCommand); await execAsyncRemote(mariadb.serverId, backupCommand);
} else { } else {
await execAsync(backupCommand); await execAsync(backupCommand, {
shell: "/bin/bash",
});
} }
await sendDatabaseBackupNotifications({ await sendDatabaseBackupNotifications({

View File

@@ -35,7 +35,9 @@ export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => {
if (mongo.serverId) { if (mongo.serverId) {
await execAsyncRemote(mongo.serverId, backupCommand); await execAsyncRemote(mongo.serverId, backupCommand);
} else { } else {
await execAsync(backupCommand); await execAsync(backupCommand, {
shell: "/bin/bash",
});
} }
await sendDatabaseBackupNotifications({ await sendDatabaseBackupNotifications({

View File

@@ -37,7 +37,9 @@ export const runMySqlBackup = async (mysql: MySql, backup: BackupSchedule) => {
if (mysql.serverId) { if (mysql.serverId) {
await execAsyncRemote(mysql.serverId, backupCommand); await execAsyncRemote(mysql.serverId, backupCommand);
} else { } else {
await execAsync(backupCommand); await execAsync(backupCommand, {
shell: "/bin/bash",
});
} }
await sendDatabaseBackupNotifications({ await sendDatabaseBackupNotifications({
applicationName: name, applicationName: name,