Skip to content

Commit 401b177

Browse files
committed
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.
1 parent 88b56ca commit 401b177

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/server/src/utils/backups/compose.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const runComposeBackup = async (
1919
const project = await findProjectById(environment.projectId);
2020
const { prefix, databaseType, serviceName } = backup;
2121
const destination = backup.destination;
22-
const backupFileName = `${new Date().toISOString()}.sql.gz`;
22+
const backupFileName = `${new Date().toISOString()}.${databaseType === "mongo" ? "bson" : "sql"}.gz`;
2323
const s3AppName = serviceName ? `${appName}_${serviceName}` : appName;
2424
const bucketDestination = `${s3AppName}/${normalizeS3Path(prefix)}${backupFileName}`;
2525
const deployment = await createDeploymentBackup({

0 commit comments

Comments
 (0)