mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
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:
parent
edcfc7d670
commit
79372527e6
@ -39,7 +39,9 @@ export const runPostgresBackup = async (
|
|||||||
if (postgres.serverId) {
|
if (postgres.serverId) {
|
||||||
await execAsyncRemote(postgres.serverId, backupCommand);
|
await execAsyncRemote(postgres.serverId, backupCommand);
|
||||||
} else {
|
} else {
|
||||||
await execAsync(backupCommand);
|
await execAsync(backupCommand, {
|
||||||
|
shell: "/bin/bash",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
await sendDatabaseBackupNotifications({
|
await sendDatabaseBackupNotifications({
|
||||||
|
@ -220,7 +220,6 @@ export const getBackupCommand = (
|
|||||||
const containerSearch = getContainerSearchCommand(backup);
|
const containerSearch = getContainerSearchCommand(backup);
|
||||||
const backupCommand = generateBackupCommand(backup);
|
const backupCommand = generateBackupCommand(backup);
|
||||||
return `
|
return `
|
||||||
#!/bin/bash
|
|
||||||
set -eo pipefail;
|
set -eo pipefail;
|
||||||
echo "[$(date)] Starting backup process..." >> ${logPath};
|
echo "[$(date)] Starting backup process..." >> ${logPath};
|
||||||
echo "[$(date)] Executing backup command..." >> ${logPath};
|
echo "[$(date)] Executing backup command..." >> ${logPath};
|
||||||
|
Loading…
Reference in New Issue
Block a user