From dcdbed047bff66eda5e5f824bd58e252d913a6d4 Mon Sep 17 00:00:00 2001 From: HarikrishnanD Date: Tue, 4 Nov 2025 16:06:01 +0530 Subject: [PATCH 1/4] fix: change backup file naming to Windows-compatible format --- packages/server/src/utils/backups/compose.ts | 3 ++- packages/server/src/utils/backups/mariadb.ts | 3 ++- packages/server/src/utils/backups/mongo.ts | 3 ++- packages/server/src/utils/backups/mysql.ts | 3 ++- packages/server/src/utils/backups/postgres.ts | 3 ++- packages/server/src/utils/volume-backups/backup.ts | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/server/src/utils/backups/compose.ts b/packages/server/src/utils/backups/compose.ts index 1963f2c91..459cd881d 100644 --- a/packages/server/src/utils/backups/compose.ts +++ b/packages/server/src/utils/backups/compose.ts @@ -19,7 +19,8 @@ export const runComposeBackup = async ( const project = await findProjectById(environment.projectId); const { prefix, databaseType } = 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}`; const deployment = await createDeploymentBackup({ backupId: backup.backupId, diff --git a/packages/server/src/utils/backups/mariadb.ts b/packages/server/src/utils/backups/mariadb.ts index 2353821e5..7f086ea58 100644 --- a/packages/server/src/utils/backups/mariadb.ts +++ b/packages/server/src/utils/backups/mariadb.ts @@ -19,7 +19,8 @@ export const runMariadbBackup = async ( const project = await findProjectById(environment.projectId); 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}`; const deployment = await createDeploymentBackup({ backupId: backup.backupId, diff --git a/packages/server/src/utils/backups/mongo.ts b/packages/server/src/utils/backups/mongo.ts index 429de7d4d..1cec601da 100644 --- a/packages/server/src/utils/backups/mongo.ts +++ b/packages/server/src/utils/backups/mongo.ts @@ -16,7 +16,8 @@ export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => { const project = await findProjectById(environment.projectId); 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}`; const deployment = await createDeploymentBackup({ backupId: backup.backupId, diff --git a/packages/server/src/utils/backups/mysql.ts b/packages/server/src/utils/backups/mysql.ts index 90919f24c..37acaa43a 100644 --- a/packages/server/src/utils/backups/mysql.ts +++ b/packages/server/src/utils/backups/mysql.ts @@ -16,7 +16,8 @@ export const runMySqlBackup = async (mysql: MySql, backup: BackupSchedule) => { const project = await findProjectById(environment.projectId); 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}`; const deployment = await createDeploymentBackup({ backupId: backup.backupId, diff --git a/packages/server/src/utils/backups/postgres.ts b/packages/server/src/utils/backups/postgres.ts index 9aa5d8f5f..0fcf03d7a 100644 --- a/packages/server/src/utils/backups/postgres.ts +++ b/packages/server/src/utils/backups/postgres.ts @@ -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); diff --git a/packages/server/src/utils/volume-backups/backup.ts b/packages/server/src/utils/volume-backups/backup.ts index cc613ffa9..00270c444 100644 --- a/packages/server/src/utils/volume-backups/backup.ts +++ b/packages/server/src/utils/volume-backups/backup.ts @@ -12,7 +12,8 @@ export const backupVolume = async ( volumeBackup.application?.serverId || volumeBackup.compose?.serverId; const { VOLUME_BACKUPS_PATH } = paths(!!serverId); const destination = volumeBackup.destination; - const backupFileName = `${volumeName}-${new Date().toISOString()}.tar`; + const timestamp = new Date().toISOString().replace('T', '_').replace(/:/g, '-').replace('.', '_'); + const backupFileName = `${volumeName}-${timestamp}.tar`; const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`; const rcloneFlags = getS3Credentials(volumeBackup.destination); const rcloneDestination = `:s3:${destination.bucket}/${bucketDestination}`; From d6704dbd27f2266ef0b3d050b56250a64d19e68a Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 10:38:15 +0000 Subject: [PATCH 2/4] [autofix.ci] apply automated fixes --- packages/server/src/utils/backups/compose.ts | 6 +++++- packages/server/src/utils/backups/mariadb.ts | 6 +++++- packages/server/src/utils/backups/mongo.ts | 6 +++++- packages/server/src/utils/backups/mysql.ts | 6 +++++- packages/server/src/utils/backups/postgres.ts | 6 +++++- packages/server/src/utils/volume-backups/backup.ts | 6 +++++- 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/packages/server/src/utils/backups/compose.ts b/packages/server/src/utils/backups/compose.ts index 459cd881d..c5df28bdc 100644 --- a/packages/server/src/utils/backups/compose.ts +++ b/packages/server/src/utils/backups/compose.ts @@ -19,7 +19,11 @@ export const runComposeBackup = async ( const project = await findProjectById(environment.projectId); const { prefix, databaseType } = backup; const destination = backup.destination; - const timestamp = new Date().toISOString().replace('T', '_').replace(/:/g, '-').replace('.', '_'); + const timestamp = new Date() + .toISOString() + .replace("T", "_") + .replace(/:/g, "-") + .replace(".", "_"); const backupFileName = `${timestamp}.sql.gz`; const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ diff --git a/packages/server/src/utils/backups/mariadb.ts b/packages/server/src/utils/backups/mariadb.ts index 7f086ea58..ef5035e2d 100644 --- a/packages/server/src/utils/backups/mariadb.ts +++ b/packages/server/src/utils/backups/mariadb.ts @@ -19,7 +19,11 @@ export const runMariadbBackup = async ( const project = await findProjectById(environment.projectId); const { prefix } = backup; const destination = backup.destination; - const timestamp = new Date().toISOString().replace('T', '_').replace(/:/g, '-').replace('.', '_'); + const timestamp = new Date() + .toISOString() + .replace("T", "_") + .replace(/:/g, "-") + .replace(".", "_"); const backupFileName = `${timestamp}.sql.gz`; const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ diff --git a/packages/server/src/utils/backups/mongo.ts b/packages/server/src/utils/backups/mongo.ts index 1cec601da..f069dec31 100644 --- a/packages/server/src/utils/backups/mongo.ts +++ b/packages/server/src/utils/backups/mongo.ts @@ -16,7 +16,11 @@ export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => { const project = await findProjectById(environment.projectId); const { prefix } = backup; const destination = backup.destination; - const timestamp = new Date().toISOString().replace('T', '_').replace(/:/g, '-').replace('.', '_'); + const timestamp = new Date() + .toISOString() + .replace("T", "_") + .replace(/:/g, "-") + .replace(".", "_"); const backupFileName = `${timestamp}.sql.gz`; const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ diff --git a/packages/server/src/utils/backups/mysql.ts b/packages/server/src/utils/backups/mysql.ts index 37acaa43a..ecd0b6690 100644 --- a/packages/server/src/utils/backups/mysql.ts +++ b/packages/server/src/utils/backups/mysql.ts @@ -16,7 +16,11 @@ export const runMySqlBackup = async (mysql: MySql, backup: BackupSchedule) => { const project = await findProjectById(environment.projectId); const { prefix } = backup; const destination = backup.destination; - const timestamp = new Date().toISOString().replace('T', '_').replace(/:/g, '-').replace('.', '_'); + const timestamp = new Date() + .toISOString() + .replace("T", "_") + .replace(/:/g, "-") + .replace(".", "_"); const backupFileName = `${timestamp}.sql.gz`; const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ diff --git a/packages/server/src/utils/backups/postgres.ts b/packages/server/src/utils/backups/postgres.ts index 0fcf03d7a..3d67274ed 100644 --- a/packages/server/src/utils/backups/postgres.ts +++ b/packages/server/src/utils/backups/postgres.ts @@ -25,7 +25,11 @@ export const runPostgresBackup = async ( }); const { prefix } = backup; const destination = backup.destination; - const timestamp = new Date().toISOString().replace('T', '_').replace(/:/g, '-').replace('.', '_'); + const timestamp = new Date() + .toISOString() + .replace("T", "_") + .replace(/:/g, "-") + .replace(".", "_"); const backupFileName = `${timestamp}.sql.gz`; const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`; try { diff --git a/packages/server/src/utils/volume-backups/backup.ts b/packages/server/src/utils/volume-backups/backup.ts index 00270c444..831c830c0 100644 --- a/packages/server/src/utils/volume-backups/backup.ts +++ b/packages/server/src/utils/volume-backups/backup.ts @@ -12,7 +12,11 @@ export const backupVolume = async ( volumeBackup.application?.serverId || volumeBackup.compose?.serverId; const { VOLUME_BACKUPS_PATH } = paths(!!serverId); const destination = volumeBackup.destination; - const timestamp = new Date().toISOString().replace('T', '_').replace(/:/g, '-').replace('.', '_'); + const timestamp = new Date() + .toISOString() + .replace("T", "_") + .replace(/:/g, "-") + .replace(".", "_"); const backupFileName = `${volumeName}-${timestamp}.tar`; const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`; const rcloneFlags = getS3Credentials(volumeBackup.destination); From 71de71fb8a89b135ae6454258d736f9b85cbda5c Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Fri, 3 Apr 2026 17:13:00 -0600 Subject: [PATCH 3/4] refactor(backups): standardize backup file naming using getBackupTimestamp utility - Replaced inline timestamp generation with the new getBackupTimestamp function across various backup modules (compose, libsql, mariadb, mongo, mysql, postgres, web-server, and volume-backups). - Improved code readability and maintainability by centralizing timestamp formatting logic. --- packages/server/src/utils/backups/compose.ts | 9 ++------- packages/server/src/utils/backups/libsql.ts | 4 ++-- packages/server/src/utils/backups/mariadb.ts | 9 ++------- packages/server/src/utils/backups/mongo.ts | 9 ++------- packages/server/src/utils/backups/mysql.ts | 9 ++------- packages/server/src/utils/backups/postgres.ts | 9 ++------- packages/server/src/utils/backups/utils.ts | 3 +++ packages/server/src/utils/backups/web-server.ts | 4 ++-- packages/server/src/utils/volume-backups/backup.ts | 9 ++------- 9 files changed, 19 insertions(+), 46 deletions(-) diff --git a/packages/server/src/utils/backups/compose.ts b/packages/server/src/utils/backups/compose.ts index f91b48bed..943fd513d 100644 --- a/packages/server/src/utils/backups/compose.ts +++ b/packages/server/src/utils/backups/compose.ts @@ -8,7 +8,7 @@ import { findEnvironmentById } from "@dokploy/server/services/environment"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getS3Credentials, normalizeS3Path } from "./utils"; +import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; export const runComposeBackup = async ( compose: Compose, @@ -19,12 +19,7 @@ export const runComposeBackup = async ( const project = await findProjectById(environment.projectId); const { prefix, databaseType, serviceName } = backup; const destination = backup.destination; - const timestamp = new Date() - .toISOString() - .replace("T", "_") - .replace(/:/g, "-") - .replace(".", "_"); - const backupFileName = `${timestamp}.${databaseType === "mongo" ? "bson" : "sql"}.gz`; + const backupFileName = `${getBackupTimestamp()}.${databaseType === "mongo" ? "bson" : "sql"}.gz`; const s3AppName = serviceName ? `${appName}_${serviceName}` : appName; const bucketDestination = `${s3AppName}/${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ diff --git a/packages/server/src/utils/backups/libsql.ts b/packages/server/src/utils/backups/libsql.ts index e7880795c..4c06308b2 100644 --- a/packages/server/src/utils/backups/libsql.ts +++ b/packages/server/src/utils/backups/libsql.ts @@ -8,7 +8,7 @@ import type { Libsql } from "@dokploy/server/services/libsql"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getS3Credentials, normalizeS3Path } from "./utils"; +import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; export const runLibsqlBackup = async ( libsql: Libsql, @@ -25,7 +25,7 @@ export const runLibsqlBackup = async ( }); const { prefix } = backup; const destination = backup.destination; - const backupFileName = `${new Date().toISOString()}.sql.gz`; + const backupFileName = `${getBackupTimestamp()}.sql.gz`; const bucketDestination = `${appName}/${normalizeS3Path(prefix)}${backupFileName}`; try { const rcloneFlags = getS3Credentials(destination); diff --git a/packages/server/src/utils/backups/mariadb.ts b/packages/server/src/utils/backups/mariadb.ts index 152a6e24b..5cb5840a6 100644 --- a/packages/server/src/utils/backups/mariadb.ts +++ b/packages/server/src/utils/backups/mariadb.ts @@ -8,7 +8,7 @@ import type { Mariadb } from "@dokploy/server/services/mariadb"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getS3Credentials, normalizeS3Path } from "./utils"; +import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; export const runMariadbBackup = async ( mariadb: Mariadb, @@ -19,12 +19,7 @@ export const runMariadbBackup = async ( const project = await findProjectById(environment.projectId); const { prefix } = backup; const destination = backup.destination; - const timestamp = new Date() - .toISOString() - .replace("T", "_") - .replace(/:/g, "-") - .replace(".", "_"); - const backupFileName = `${timestamp}.sql.gz`; + const backupFileName = `${getBackupTimestamp()}.sql.gz`; const bucketDestination = `${appName}/${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ backupId: backup.backupId, diff --git a/packages/server/src/utils/backups/mongo.ts b/packages/server/src/utils/backups/mongo.ts index 71fbf71a5..b60a74158 100644 --- a/packages/server/src/utils/backups/mongo.ts +++ b/packages/server/src/utils/backups/mongo.ts @@ -8,7 +8,7 @@ import type { Mongo } from "@dokploy/server/services/mongo"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getS3Credentials, normalizeS3Path } from "./utils"; +import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => { const { environmentId, name, appName } = mongo; @@ -16,12 +16,7 @@ export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => { const project = await findProjectById(environment.projectId); const { prefix } = backup; const destination = backup.destination; - const timestamp = new Date() - .toISOString() - .replace("T", "_") - .replace(/:/g, "-") - .replace(".", "_"); - const backupFileName = `${timestamp}.bson.gz`; + const backupFileName = `${getBackupTimestamp()}.bson.gz`; const bucketDestination = `${appName}/${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ backupId: backup.backupId, diff --git a/packages/server/src/utils/backups/mysql.ts b/packages/server/src/utils/backups/mysql.ts index ceb889478..d1386b5a8 100644 --- a/packages/server/src/utils/backups/mysql.ts +++ b/packages/server/src/utils/backups/mysql.ts @@ -8,7 +8,7 @@ import type { MySql } from "@dokploy/server/services/mysql"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getS3Credentials, normalizeS3Path } from "./utils"; +import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; export const runMySqlBackup = async (mysql: MySql, backup: BackupSchedule) => { const { environmentId, name, appName } = mysql; @@ -16,12 +16,7 @@ export const runMySqlBackup = async (mysql: MySql, backup: BackupSchedule) => { const project = await findProjectById(environment.projectId); const { prefix } = backup; const destination = backup.destination; - const timestamp = new Date() - .toISOString() - .replace("T", "_") - .replace(/:/g, "-") - .replace(".", "_"); - const backupFileName = `${timestamp}.sql.gz`; + const backupFileName = `${getBackupTimestamp()}.sql.gz`; const bucketDestination = `${appName}/${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ backupId: backup.backupId, diff --git a/packages/server/src/utils/backups/postgres.ts b/packages/server/src/utils/backups/postgres.ts index 7b0b4fe5b..624fe3500 100644 --- a/packages/server/src/utils/backups/postgres.ts +++ b/packages/server/src/utils/backups/postgres.ts @@ -8,7 +8,7 @@ import type { Postgres } from "@dokploy/server/services/postgres"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getS3Credentials, normalizeS3Path } from "./utils"; +import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; export const runPostgresBackup = async ( postgres: Postgres, @@ -25,12 +25,7 @@ export const runPostgresBackup = async ( }); const { prefix } = backup; const destination = backup.destination; - const timestamp = new Date() - .toISOString() - .replace("T", "_") - .replace(/:/g, "-") - .replace(".", "_"); - const backupFileName = `${timestamp}.sql.gz`; + const backupFileName = `${getBackupTimestamp()}.sql.gz`; const bucketDestination = `${appName}/${normalizeS3Path(prefix)}${backupFileName}`; try { const rcloneFlags = getS3Credentials(destination); diff --git a/packages/server/src/utils/backups/utils.ts b/packages/server/src/utils/backups/utils.ts index 9d6a5373d..365ebff41 100644 --- a/packages/server/src/utils/backups/utils.ts +++ b/packages/server/src/utils/backups/utils.ts @@ -56,6 +56,9 @@ export const removeScheduleBackup = (backupId: string) => { currentJob?.cancel(); }; +export const getBackupTimestamp = () => + new Date().toISOString().replace(/[:.]/g, "-"); + export const normalizeS3Path = (prefix: string) => { // Trim whitespace and remove leading/trailing slashes const normalizedPrefix = prefix.trim().replace(/^\/+|\/+$/g, ""); diff --git a/packages/server/src/utils/backups/web-server.ts b/packages/server/src/utils/backups/web-server.ts index 19dd44eed..19975cd6f 100644 --- a/packages/server/src/utils/backups/web-server.ts +++ b/packages/server/src/utils/backups/web-server.ts @@ -11,7 +11,7 @@ import { import { findDestinationById } from "@dokploy/server/services/destination"; import { sendDokployBackupNotifications } from "../notifications/dokploy-backup"; import { execAsync } from "../process/execAsync"; -import { getS3Credentials, normalizeS3Path } from "./utils"; +import { getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; function formatBytes(bytes?: number) { if (bytes === undefined) return "Unknown size"; @@ -37,7 +37,7 @@ export const runWebServerBackup = async (backup: BackupSchedule) => { try { const destination = await findDestinationById(backup.destinationId); const rcloneFlags = getS3Credentials(destination); - const timestamp = new Date().toISOString().replace(/[:.]/g, "-"); + const timestamp = getBackupTimestamp(); const { BASE_PATH } = paths(); const tempDir = await mkdtemp(join(tmpdir(), "dokploy-backup-")); const backupFileName = `webserver-backup-${timestamp}.zip`; diff --git a/packages/server/src/utils/volume-backups/backup.ts b/packages/server/src/utils/volume-backups/backup.ts index dd6ea0b2d..a54301588 100644 --- a/packages/server/src/utils/volume-backups/backup.ts +++ b/packages/server/src/utils/volume-backups/backup.ts @@ -2,7 +2,7 @@ import path from "node:path"; import { paths } from "@dokploy/server/constants"; import { findComposeById } from "@dokploy/server/services/compose"; import type { findVolumeBackupById } from "@dokploy/server/services/volume-backups"; -import { getS3Credentials, normalizeS3Path } from "../backups/utils"; +import { getBackupTimestamp, getS3Credentials, normalizeS3Path } from "../backups/utils"; export const getVolumeServiceAppName = ( volumeBackup: Awaited>, @@ -32,12 +32,7 @@ export const backupVolume = async ( const { VOLUME_BACKUPS_PATH, VOLUME_BACKUP_LOCK_PATH } = paths(!!serverId); const destination = volumeBackup.destination; const s3AppName = getVolumeServiceAppName(volumeBackup); - const timestamp = new Date() - .toISOString() - .replace("T", "_") - .replace(/:/g, "-") - .replace(".", "_"); - const backupFileName = `${volumeName}-${timestamp}.tar`; + const backupFileName = `${volumeName}-${getBackupTimestamp()}.tar`; const bucketDestination = `${s3AppName}/${normalizeS3Path(prefix || "")}${backupFileName}`; const rcloneFlags = getS3Credentials(volumeBackup.destination); const rcloneDestination = `:s3:${destination.bucket}/${bucketDestination}`; From fd2097ea23127d7b5a956c1c7ca6a302cd798c22 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 23:13:32 +0000 Subject: [PATCH 4/4] [autofix.ci] apply automated fixes --- packages/server/src/utils/backups/compose.ts | 7 ++++++- packages/server/src/utils/backups/libsql.ts | 7 ++++++- packages/server/src/utils/backups/mariadb.ts | 7 ++++++- packages/server/src/utils/backups/mongo.ts | 7 ++++++- packages/server/src/utils/backups/mysql.ts | 7 ++++++- packages/server/src/utils/backups/postgres.ts | 7 ++++++- packages/server/src/utils/volume-backups/backup.ts | 6 +++++- 7 files changed, 41 insertions(+), 7 deletions(-) diff --git a/packages/server/src/utils/backups/compose.ts b/packages/server/src/utils/backups/compose.ts index 943fd513d..6640590b0 100644 --- a/packages/server/src/utils/backups/compose.ts +++ b/packages/server/src/utils/backups/compose.ts @@ -8,7 +8,12 @@ import { findEnvironmentById } from "@dokploy/server/services/environment"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; +import { + getBackupCommand, + getBackupTimestamp, + getS3Credentials, + normalizeS3Path, +} from "./utils"; export const runComposeBackup = async ( compose: Compose, diff --git a/packages/server/src/utils/backups/libsql.ts b/packages/server/src/utils/backups/libsql.ts index 4c06308b2..a994db8bd 100644 --- a/packages/server/src/utils/backups/libsql.ts +++ b/packages/server/src/utils/backups/libsql.ts @@ -8,7 +8,12 @@ import type { Libsql } from "@dokploy/server/services/libsql"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; +import { + getBackupCommand, + getBackupTimestamp, + getS3Credentials, + normalizeS3Path, +} from "./utils"; export const runLibsqlBackup = async ( libsql: Libsql, diff --git a/packages/server/src/utils/backups/mariadb.ts b/packages/server/src/utils/backups/mariadb.ts index 5cb5840a6..dea22ff18 100644 --- a/packages/server/src/utils/backups/mariadb.ts +++ b/packages/server/src/utils/backups/mariadb.ts @@ -8,7 +8,12 @@ import type { Mariadb } from "@dokploy/server/services/mariadb"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; +import { + getBackupCommand, + getBackupTimestamp, + getS3Credentials, + normalizeS3Path, +} from "./utils"; export const runMariadbBackup = async ( mariadb: Mariadb, diff --git a/packages/server/src/utils/backups/mongo.ts b/packages/server/src/utils/backups/mongo.ts index b60a74158..cebece14f 100644 --- a/packages/server/src/utils/backups/mongo.ts +++ b/packages/server/src/utils/backups/mongo.ts @@ -8,7 +8,12 @@ import type { Mongo } from "@dokploy/server/services/mongo"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; +import { + getBackupCommand, + getBackupTimestamp, + getS3Credentials, + normalizeS3Path, +} from "./utils"; export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => { const { environmentId, name, appName } = mongo; diff --git a/packages/server/src/utils/backups/mysql.ts b/packages/server/src/utils/backups/mysql.ts index d1386b5a8..a72f59880 100644 --- a/packages/server/src/utils/backups/mysql.ts +++ b/packages/server/src/utils/backups/mysql.ts @@ -8,7 +8,12 @@ import type { MySql } from "@dokploy/server/services/mysql"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; +import { + getBackupCommand, + getBackupTimestamp, + getS3Credentials, + normalizeS3Path, +} from "./utils"; export const runMySqlBackup = async (mysql: MySql, backup: BackupSchedule) => { const { environmentId, name, appName } = mysql; diff --git a/packages/server/src/utils/backups/postgres.ts b/packages/server/src/utils/backups/postgres.ts index 624fe3500..30a88db2b 100644 --- a/packages/server/src/utils/backups/postgres.ts +++ b/packages/server/src/utils/backups/postgres.ts @@ -8,7 +8,12 @@ import type { Postgres } from "@dokploy/server/services/postgres"; import { findProjectById } from "@dokploy/server/services/project"; import { sendDatabaseBackupNotifications } from "../notifications/database-backup"; import { execAsync, execAsyncRemote } from "../process/execAsync"; -import { getBackupCommand, getBackupTimestamp, getS3Credentials, normalizeS3Path } from "./utils"; +import { + getBackupCommand, + getBackupTimestamp, + getS3Credentials, + normalizeS3Path, +} from "./utils"; export const runPostgresBackup = async ( postgres: Postgres, diff --git a/packages/server/src/utils/volume-backups/backup.ts b/packages/server/src/utils/volume-backups/backup.ts index a54301588..1d795a14a 100644 --- a/packages/server/src/utils/volume-backups/backup.ts +++ b/packages/server/src/utils/volume-backups/backup.ts @@ -2,7 +2,11 @@ import path from "node:path"; import { paths } from "@dokploy/server/constants"; import { findComposeById } from "@dokploy/server/services/compose"; import type { findVolumeBackupById } from "@dokploy/server/services/volume-backups"; -import { getBackupTimestamp, getS3Credentials, normalizeS3Path } from "../backups/utils"; +import { + getBackupTimestamp, + getS3Credentials, + normalizeS3Path, +} from "../backups/utils"; export const getVolumeServiceAppName = ( volumeBackup: Awaited>,