mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Implement cloud check in backup and restore functions: add IS_CLOUD condition to skip operations for cloud environments in runWebServerBackup and restoreWebServerBackup functions.
This commit is contained in:
@@ -2,10 +2,13 @@ import type { BackupSchedule } from "@dokploy/server/services/backup";
|
||||
import { execAsync } from "../process/execAsync";
|
||||
import { getS3Credentials } from "./utils";
|
||||
import { findDestinationById } from "@dokploy/server/services/destination";
|
||||
import { paths } from "@dokploy/server/constants";
|
||||
import { IS_CLOUD, paths } from "@dokploy/server/constants";
|
||||
|
||||
export const runWebServerBackup = async (backup: BackupSchedule) => {
|
||||
try {
|
||||
if (IS_CLOUD) {
|
||||
return;
|
||||
}
|
||||
const destination = await findDestinationById(backup.destinationId);
|
||||
const rcloneFlags = getS3Credentials(destination);
|
||||
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
||||
|
||||
Reference in New Issue
Block a user