From ec02b6cbb3e8039ba1d09a2498b92fecc67faf36 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 8 Sep 2025 15:59:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20AMF=E5=92=8CMME=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84=E5=A4=87=E4=BB=BD=E7=BC=BA=E5=B0=91csv=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../network_element/service/ne_config_backup.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/network_element/service/ne_config_backup.go b/src/modules/network_element/service/ne_config_backup.go index 73404252..efd2a6ad 100644 --- a/src/modules/network_element/service/ne_config_backup.go +++ b/src/modules/network_element/service/ne_config_backup.go @@ -131,8 +131,11 @@ func (s NeConfigBackup) FileLocalToNe(neInfo model.NeInfo, localFile string) err default: neEtcPath := fmt.Sprintf("/usr/local/etc/%s", neTypeLower) chmodFile := fmt.Sprintf("sudo chmod 777 %s/*.yaml", neEtcPath) + if neTypeLower == "amf" { + chmodFile = fmt.Sprintf("sudo chmod 777 %s/*.{yaml,csv}", neEtcPath) + } if neTypeLower == "mme" { - chmodFile = fmt.Sprintf("sudo chmod 777 %s/*.{yaml,conf}", neEtcPath) + chmodFile = fmt.Sprintf("sudo chmod 777 %s/*.{yaml,conf,csv}", neEtcPath) } sshClient.RunCMD(fmt.Sprintf("sudo cp -rf %s/* %s && %s", neDirTemp, neEtcPath, chmodFile)) } @@ -193,8 +196,11 @@ func (s NeConfigBackup) FileNeToLocal(neInfo model.NeInfo) (string, error) { sshClient.RunCMD(fmt.Sprintf("mkdir -p %s/kvdb && sudo cp -rf /usr/local/etc/kvdb/log %s/kvdb", neDirTemp, neDirTemp)) default: nePath := fmt.Sprintf("/usr/local/etc/%s/*.yaml", neTypeLower) + if neTypeLower == "amf" { + nePath = fmt.Sprintf("/usr/local/etc/%s/*.{yaml,csv}", neTypeLower) + } if neTypeLower == "mme" { - nePath = fmt.Sprintf("/usr/local/etc/%s/*.{yaml,conf}", neTypeLower) + nePath = fmt.Sprintf("/usr/local/etc/%s/*.{yaml,conf,csv}", neTypeLower) } sshClient.RunCMD(fmt.Sprintf("mkdir -p %s && sudo cp -rf %s %s", neDirTemp, nePath, neDirTemp)) }