refactor: update backup file paths to include app name for better organization

This commit is contained in:
Mauricio Siu
2026-03-07 01:48:11 -06:00
parent c106d13ab5
commit a5a4a1a818
9 changed files with 13 additions and 23 deletions

View File

@@ -13,10 +13,7 @@ export const backupVolume = async (
const { VOLUME_BACKUPS_PATH, VOLUME_BACKUP_LOCK_PATH } = paths(!!serverId);
const destination = volumeBackup.destination;
const backupFileName = `${volumeName}-${new Date().toISOString()}.tar`;
const effectivePrefix = prefix
? normalizeS3Path(prefix)
: `${volumeBackup.appName}/`;
const bucketDestination = `${effectivePrefix}${backupFileName}`;
const bucketDestination = `${volumeBackup.appName}/${normalizeS3Path(prefix || "")}${backupFileName}`;
const rcloneFlags = getS3Credentials(volumeBackup.destination);
const rcloneDestination = `:s3:${destination.bucket}/${bucketDestination}`;
const volumeBackupPath = path.join(VOLUME_BACKUPS_PATH, volumeBackup.appName);