mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
fix(backups): update backup file extension based on database type
- Changed the backup file name extension to use '.bson' for MongoDB and '.sql' for other database types, ensuring correct file formats for backups.
This commit is contained in:
@@ -19,7 +19,7 @@ export const runComposeBackup = async (
|
|||||||
const project = await findProjectById(environment.projectId);
|
const project = await findProjectById(environment.projectId);
|
||||||
const { prefix, databaseType, serviceName } = backup;
|
const { prefix, databaseType, serviceName } = backup;
|
||||||
const destination = backup.destination;
|
const destination = backup.destination;
|
||||||
const backupFileName = `${new Date().toISOString()}.sql.gz`;
|
const backupFileName = `${new Date().toISOString()}.${databaseType === "mongo" ? "bson" : "sql"}.gz`;
|
||||||
const s3AppName = serviceName ? `${appName}_${serviceName}` : appName;
|
const s3AppName = serviceName ? `${appName}_${serviceName}` : appName;
|
||||||
const bucketDestination = `${s3AppName}/${normalizeS3Path(prefix)}${backupFileName}`;
|
const bucketDestination = `${s3AppName}/${normalizeS3Path(prefix)}${backupFileName}`;
|
||||||
const deployment = await createDeploymentBackup({
|
const deployment = await createDeploymentBackup({
|
||||||
|
|||||||
Reference in New Issue
Block a user