From 45cf295be0c5670699bd0e4bc016d2e70eb42c20 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Mon, 5 May 2025 02:52:50 -0600 Subject: [PATCH] Update backup command execution to use bash shell in multiple backup utilities - Modified the `execAsync` calls in `compose.ts`, `mariadb.ts`, `mongo.ts`, and `mysql.ts` to specify the bash shell for executing backup commands, ensuring compatibility with bash-specific features across all backup utilities. --- packages/server/src/utils/backups/compose.ts | 4 +++- packages/server/src/utils/backups/mariadb.ts | 4 +++- packages/server/src/utils/backups/mongo.ts | 4 +++- packages/server/src/utils/backups/mysql.ts | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/server/src/utils/backups/compose.ts b/packages/server/src/utils/backups/compose.ts index 79cb69e8..1e12cafa 100644 --- a/packages/server/src/utils/backups/compose.ts +++ b/packages/server/src/utils/backups/compose.ts @@ -38,7 +38,9 @@ export const runComposeBackup = async ( if (compose.serverId) { await execAsyncRemote(compose.serverId, backupCommand); } else { - await execAsync(backupCommand); + await execAsync(backupCommand, { + shell: "/bin/bash", + }); } await sendDatabaseBackupNotifications({ diff --git a/packages/server/src/utils/backups/mariadb.ts b/packages/server/src/utils/backups/mariadb.ts index 6f71939e..b998c006 100644 --- a/packages/server/src/utils/backups/mariadb.ts +++ b/packages/server/src/utils/backups/mariadb.ts @@ -37,7 +37,9 @@ export const runMariadbBackup = async ( if (mariadb.serverId) { await execAsyncRemote(mariadb.serverId, backupCommand); } else { - await execAsync(backupCommand); + await execAsync(backupCommand, { + shell: "/bin/bash", + }); } await sendDatabaseBackupNotifications({ diff --git a/packages/server/src/utils/backups/mongo.ts b/packages/server/src/utils/backups/mongo.ts index 815439d5..6da79b6c 100644 --- a/packages/server/src/utils/backups/mongo.ts +++ b/packages/server/src/utils/backups/mongo.ts @@ -35,7 +35,9 @@ export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => { if (mongo.serverId) { await execAsyncRemote(mongo.serverId, backupCommand); } else { - await execAsync(backupCommand); + await execAsync(backupCommand, { + shell: "/bin/bash", + }); } await sendDatabaseBackupNotifications({ diff --git a/packages/server/src/utils/backups/mysql.ts b/packages/server/src/utils/backups/mysql.ts index 80a24827..4799f47c 100644 --- a/packages/server/src/utils/backups/mysql.ts +++ b/packages/server/src/utils/backups/mysql.ts @@ -37,7 +37,9 @@ export const runMySqlBackup = async (mysql: MySql, backup: BackupSchedule) => { if (mysql.serverId) { await execAsyncRemote(mysql.serverId, backupCommand); } else { - await execAsync(backupCommand); + await execAsync(backupCommand, { + shell: "/bin/bash", + }); } await sendDatabaseBackupNotifications({ applicationName: name,