feat: route libsql backups through generic destinations

This commit is contained in:
Furox 2026-09-04 20:22:44 +03:00 committed by Furox88
parent cea07b79c5
commit 7008ac6e4e

View File

@ -12,7 +12,7 @@ import { execAsync, execAsyncRemote } from "../process/execAsync";
import {
getBackupCommand,
getBackupTimestamp,
getS3Credentials,
getRclonePathAndFlags,
normalizeS3Path,
} from "./utils";
@ -34,8 +34,8 @@ export const runLibsqlBackup = 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,