Update backup command execution to use bash shell

- Modified the `execAsync` call in `postgres.ts` to specify the bash shell for executing backup commands, ensuring compatibility with bash-specific features.
- Removed the shebang line from the backup command script in `utils.ts` to streamline the script's execution context.
This commit is contained in:
Mauricio Siu 2025-05-05 02:37:49 -06:00
parent edcfc7d670
commit 79372527e6
2 changed files with 3 additions and 2 deletions

View File

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

View File

@ -220,7 +220,6 @@ export const getBackupCommand = (
const containerSearch = getContainerSearchCommand(backup);
const backupCommand = generateBackupCommand(backup);
return `
#!/bin/bash
set -eo pipefail;
echo "[$(date)] Starting backup process..." >> ${logPath};
echo "[$(date)] Executing backup command..." >> ${logPath};