mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
feat: restore mysql from generic destinations
This commit is contained in:
parent
8def29a688
commit
cba8f608db
@ -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({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user