mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
feat: route postgres backups through generic destinations
This commit is contained in:
parent
c99d214e8d
commit
6dfae93855
@ -12,7 +12,7 @@ import { execAsync, execAsyncRemote } from "../process/execAsync";
|
||||
import {
|
||||
getBackupCommand,
|
||||
getBackupTimestamp,
|
||||
getS3Credentials,
|
||||
getRclonePathAndFlags,
|
||||
normalizeS3Path,
|
||||
} from "./utils";
|
||||
|
||||
@ -34,8 +34,8 @@ export const runPostgresBackup = async (
|
||||
const backupFileName = `${getBackupTimestamp()}.sql.gz`;
|
||||
const bucketDestination = `${appName}/${normalizeS3Path(prefix)}${backupFileName}`;
|
||||
try {
|
||||
const rcloneFlags = getS3Credentials(destination);
|
||||
const rcloneDestination = `:s3:${destination.bucket}/${bucketDestination}`;
|
||||
const { flags: rcloneFlags, path: rcloneDestination } =
|
||||
await getRclonePathAndFlags(destination, bucketDestination);
|
||||
const backupCommand = getBackupCommand(
|
||||
backup,
|
||||
rcloneFlags,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user