diff --git a/packages/server/src/utils/backups/postgres.ts b/packages/server/src/utils/backups/postgres.ts index de7ef5500..ee82e9a6f 100644 --- a/packages/server/src/utils/backups/postgres.ts +++ b/packages/server/src/utils/backups/postgres.ts @@ -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,