fix: change backup file naming to Windows-compatible format

This commit is contained in:
HarikrishnanD
2025-11-04 16:06:01 +05:30
parent 1ce153371a
commit dcdbed047b
6 changed files with 12 additions and 6 deletions

View File

@@ -25,7 +25,8 @@ export const runPostgresBackup = async (
});
const { prefix } = backup;
const destination = backup.destination;
const backupFileName = `${new Date().toISOString()}.sql.gz`;
const timestamp = new Date().toISOString().replace('T', '_').replace(/:/g, '-').replace('.', '_');
const backupFileName = `${timestamp}.sql.gz`;
const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`;
try {
const rcloneFlags = getS3Credentials(destination);