From cba8f608dba696dba9bcf8058cfd7f4791cd79b5 Mon Sep 17 00:00:00 2001 From: Furox Date: Fri, 4 Sep 2026 20:26:54 +0300 Subject: [PATCH] feat: restore mysql from generic destinations --- packages/server/src/utils/restore/mysql.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/server/src/utils/restore/mysql.ts b/packages/server/src/utils/restore/mysql.ts index d237da895..bd6f55292 100644 --- a/packages/server/src/utils/restore/mysql.ts +++ b/packages/server/src/utils/restore/mysql.ts @@ -3,7 +3,7 @@ import type { Destination } from "@dokploy/server/services/destination"; import type { MySql } from "@dokploy/server/services/mysql"; 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"; @@ -16,10 +16,8 @@ export const restoreMySqlBackup = async ( try { const { appName, databaseRootPassword, serverId } = mysql; - const rcloneFlags = getS3Credentials(destination); - const bucketPath = `:s3:${destination.bucket}`; - const backupPath = `${bucketPath}/${backupInput.backupFile}`; - + const { flags: rcloneFlags, path: backupPath } = + await getRclonePathAndFlags(destination, backupInput.backupFile); const rcloneCommand = `rclone cat ${rcloneFlags.join(" ")} ${quote([backupPath])} | gunzip`; const command = getRestoreCommand({