style: 添加系统备份功能,权限控制分配
This commit is contained in:
1 parent
adda53889f
commit
9f653c650b
5 files changed
+10
-10
No files matched your search
@@ -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