From 4c14dc6f52d3bd2ccaa63885d9ef1438d406c43f Mon Sep 17 00:00:00 2001 From: Furox Date: Fri, 4 Sep 2026 20:27:47 +0300 Subject: [PATCH] feat: restore compose backups from generic destinations --- packages/server/src/utils/restore/compose.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/server/src/utils/restore/compose.ts b/packages/server/src/utils/restore/compose.ts index 07f23c772..d2581ea3d 100644 --- a/packages/server/src/utils/restore/compose.ts +++ b/packages/server/src/utils/restore/compose.ts @@ -3,7 +3,7 @@ import type { Compose } from "@dokploy/server/services/compose"; import type { Destination } from "@dokploy/server/services/destination"; import { quote } from "shell-quote"; import type { z } from "zod"; -import { getS3Credentials } from "../backups/utils"; +import { getRclonePathAndFlags } from "../backups/utils"; import { execAsync, execAsyncRemote } from "../process/execAsync"; import { getRestoreCommand } from "./utils"; @@ -24,9 +24,8 @@ export const restoreComposeBackup = async ( } const { serverId, appName, composeType } = compose; - const rcloneFlags = getS3Credentials(destination); - const bucketPath = `:s3:${destination.bucket}`; - const backupPath = `${bucketPath}/${backupInput.backupFile}`; + const { flags: rcloneFlags, path: backupPath } = + await getRclonePathAndFlags(destination, backupInput.backupFile); let rcloneCommand = `rclone cat ${rcloneFlags.join(" ")} ${quote([backupPath])} | gunzip`; if (backupInput.metadata?.mongo) {