Skip to content

Commit 6277eba

Browse files
authored
Merge pull request #1823 from Dokploy/fix/dokploy-backups-race-condition
Fix/dokploy backups race condition
2 parents 95d949f + 2b08116 commit 6277eba

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ WORKDIR /app
2929
# Set production
3030
ENV NODE_ENV=production
3131

32-
RUN apt-get update && apt-get install -y curl unzip zip apache2-utils iproute2 && rm -rf /var/lib/apt/lists/*
32+
RUN apt-get update && apt-get install -y curl unzip zip apache2-utils iproute2 rsync && rm -rf /var/lib/apt/lists/*
3333

3434
# Copy only the necessary files
3535
COPY --from=build /prod/dokploy/.next ./.next

apps/dokploy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dokploy",
3-
"version": "v0.21.8",
3+
"version": "v0.22.0",
44
"private": true,
55
"license": "Apache-2.0",
66
"type": "module",

packages/server/src/utils/backups/web-server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ export const runWebServerBackup = async (backup: BackupSchedule) => {
5656
writeStream.write(`Running command: ${postgresCommand}\n`);
5757
await execAsync(postgresCommand);
5858

59-
await execAsync(`cp -r ${BASE_PATH}/* ${tempDir}/filesystem/`);
59+
await execAsync(
60+
`rsync -av --ignore-errors ${BASE_PATH}/ ${tempDir}/filesystem/`,
61+
);
6062

6163
writeStream.write("Copied filesystem to temp directory\n");
6264

0 commit comments

Comments
 (0)