From 54223aacef9ed89e2e1553a4712afcafe4736107 Mon Sep 17 00:00:00 2001 From: ggh-zyy <1966236926@qq.com> Date: Mon, 8 Sep 2025 11:03:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=87=E4=BB=BD=E6=97=B6=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E5=AE=89=E8=A3=85=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/dectl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/installer/dectl b/installer/dectl index d7c5036f25..aaba299690 100644 --- a/installer/dectl +++ b/installer/dectl @@ -329,6 +329,12 @@ function clear_logs() { echo "清理完毕" } function backup() { + # 检查当前目录是否在 DataEase 安装目录或其子目录下 + if [[ "$(pwd)" == "$DE_RUNNING_BASE" || "$(pwd)" == "$DE_RUNNING_BASE"/* ]]; then + echo -e "\033[31m当前目录为 DataEase 安装目录,请切换到其他目录后再执行备份操作!\033[0m" + exit 1 + fi + need_stop=0 if [[ -z $1 ]];then echo "如需备份 DataEase 数据,建议您先停止 DataEase 服务,以保证备份数据的完整性。"