-
-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL backup fails #758
Comments
I need more details, what s3 provider are you using?, deploying in remote server or dokploy server? |
I'm hosting Dokploy on my own VPS. PostgreSQL instance is running on the same VPS as the Dokploy panel. And it seems that the issue is not related to the S3 destination set up, based on the error message:
|
what VPS provider are you using? is really strange I tested with postgres 17 and is working fine, I don't consider rclone is not a recognized command because we install here https://github.com/Dokploy/dokploy/blob/canary/Dockerfile#L48 The only way it doesn't recognize the command is simple, you are trying to deploy an application on a remote server, but you didn't setup the remote server and therefore it doesn't have rclone installed, that's the only way I can think of |
Indeed, I have the
Interestingly, trying to execute similar command from inside the Dokploy container it works as expected:
Also, if I just copy-paste-execute the command from the error message it also works and I get the backup uploaded to the S3 bucket. |
I have 4 servers and they have no problems, which vps provider are you using? |
I've made some further investigation and found this source code in the Dokploy backend: if (postgres.serverId) {
const { Id: containerId } = await getRemoteServiceContainer(
postgres.serverId,
appName,
);
const pgDumpCommand = `docker exec ${containerId} sh -c "pg_dump -Fc --no-acl --no-owner -h localhost -U ${databaseUser} --no-password '${database}' | gzip"`;
await execAsyncRemote(
postgres.serverId,
`${pgDumpCommand} | ${rcloneCommand}`,
);
} else {
const { Id: containerId } = await getServiceContainer(appName);
const pgDumpCommand = `docker exec ${containerId} sh -c "pg_dump -Fc --no-acl --no-owner -h localhost -U ${databaseUser} --no-password '${database}' | gzip"`;
await execAsync(`${pgDumpCommand} | ${rcloneCommand}`);
} So apparently, in case of the remote PostgreSQL deployment, the command is executed with
Even though I have everything installed on a single VPS, I've added that server in the Dokploy settings. And when I created the PostgreSQL database instance, I selected this server, so the These are all my personal judgements, which may be wrong due to my limited experience with Dokploy. But I don't have any other way to debug the issue locally. FYI I'm using local VPS provider but I have a full root access to the instance. |
To Reproduce
Current vs. Expected behavior
I'm getting the following error in the Dokploy container logs:
Provide environment information
Which area(s) are affected? (Select all that apply)
Databases
Additional context
No response
The text was updated successfully, but these errors were encountered: