diff --git a/packages/server/src/utils/backups/compose.ts b/packages/server/src/utils/backups/compose.ts index 2fb808198..f260ffa08 100644 --- a/packages/server/src/utils/backups/compose.ts +++ b/packages/server/src/utils/backups/compose.ts @@ -17,7 +17,7 @@ export const runComposeBackup = async ( const project = await findProjectById(projectId); const { prefix, databaseType } = backup; const destination = backup.destination; - const backupFileName = `${new Date().toISOString()}.dump.gz`; + const backupFileName = `${new Date().toISOString()}.sql.gz`; const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ backupId: backup.backupId, diff --git a/packages/server/src/utils/backups/index.ts b/packages/server/src/utils/backups/index.ts index 5b74d92fc..6ce8f9e55 100644 --- a/packages/server/src/utils/backups/index.ts +++ b/packages/server/src/utils/backups/index.ts @@ -1,7 +1,11 @@ import path from "node:path"; +import { member } from "@dokploy/server/db/schema"; +import type { BackupSchedule } from "@dokploy/server/services/backup"; import { getAllServers } from "@dokploy/server/services/server"; +import { eq } from "drizzle-orm"; import { scheduleJob } from "node-schedule"; import { db } from "../../db/index"; +import { startLogCleanup } from "../access-log/handler"; import { cleanUpDockerBuilder, cleanUpSystemPrune, @@ -11,11 +15,6 @@ import { sendDockerCleanupNotifications } from "../notifications/docker-cleanup" import { execAsync, execAsyncRemote } from "../process/execAsync"; import { getS3Credentials, scheduleBackup } from "./utils"; -import { member } from "@dokploy/server/db/schema"; -import type { BackupSchedule } from "@dokploy/server/services/backup"; -import { eq } from "drizzle-orm"; -import { startLogCleanup } from "../access-log/handler"; - export const initCronJobs = async () => { console.log("Setting up cron jobs...."); diff --git a/packages/server/src/utils/backups/mongo.ts b/packages/server/src/utils/backups/mongo.ts index e626efa01..6a74f1d10 100644 --- a/packages/server/src/utils/backups/mongo.ts +++ b/packages/server/src/utils/backups/mongo.ts @@ -14,7 +14,7 @@ export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => { const project = await findProjectById(projectId); const { prefix } = backup; const destination = backup.destination; - const backupFileName = `${new Date().toISOString()}.dump.gz`; + const backupFileName = `${new Date().toISOString()}.sql.gz`; const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`; const deployment = await createDeploymentBackup({ backupId: backup.backupId, diff --git a/packages/server/src/utils/restore/utils.ts b/packages/server/src/utils/restore/utils.ts index 17be49c97..c46077238 100644 --- a/packages/server/src/utils/restore/utils.ts +++ b/packages/server/src/utils/restore/utils.ts @@ -81,7 +81,7 @@ const getMongoSpecificCommand = ( backupFile: string, ): string => { const tempDir = "/tmp/dokploy-restore"; - const fileName = backupFile.split("/").pop() || "backup.dump.gz"; + const fileName = backupFile.split("/").pop() || "backup.sql.gz"; const decompressedName = fileName.replace(".gz", ""); return ` rm -rf ${tempDir} && \