Merge branch 'canary' into Change-backup-file-naming-structure-#2955

This commit is contained in:
Mauricio Siu
2026-04-03 17:08:56 -06:00
723 changed files with 383978 additions and 20058 deletions
+5 -4
View File
@@ -14,18 +14,19 @@ export const runComposeBackup = async (
compose: Compose,
backup: BackupSchedule,
) => {
const { environmentId, name } = compose;
const { environmentId, name, appName } = compose;
const environment = await findEnvironmentById(environmentId);
const project = await findProjectById(environment.projectId);
const { prefix, databaseType } = backup;
const { prefix, databaseType, serviceName } = backup;
const destination = backup.destination;
const timestamp = new Date()
.toISOString()
.replace("T", "_")
.replace(/:/g, "-")
.replace(".", "_");
const backupFileName = `${timestamp}.sql.gz`;
const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`;
const backupFileName = `${timestamp}.${databaseType === "mongo" ? "bson" : "sql"}.gz`;
const s3AppName = serviceName ? `${appName}_${serviceName}` : appName;
const bucketDestination = `${s3AppName}/${normalizeS3Path(prefix)}${backupFileName}`;
const deployment = await createDeploymentBackup({
backupId: backup.backupId,
title: "Compose Backup",