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