style: 添加系统备份功能,权限控制分配
This commit is contained in:
@@ -169,8 +169,8 @@ func (s NeConfigBackup) FileNeToLocalPath(neInfo model.NeInfo, localDirPath stri
|
||||
}
|
||||
|
||||
// 网元端复制到本地
|
||||
if err := file.CopyDir(neDirTemp, localDirPath); err != nil {
|
||||
return fmt.Errorf("copy config err")
|
||||
if err = sftpClient.CopyDirRemoteToLocal(neDirTemp, localDirPath); err != nil {
|
||||
return fmt.Errorf("copy config from ne err")
|
||||
}
|
||||
sshClient.RunCMD(fmt.Sprintf("sudo rm -rf %s", neDirTemp)) // 删除临时目录
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user