fix: AMF和MME类型的备份缺少csv文件
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user