shell脚本-通过lftp同步远端目录到本地

#!/bin/bash
 ( echo "connect -u ${username},${password} sftp://${IP}:${Port}"
   echo "cd ${remote_path}"
   echo "lcd ${local_path}"
   echo "mirror --parallel=3 ${sync_path_name}"
   echo "bye")|lftp
#相关变量可以换成实际的服务器信息,也可以从单独的配置文件中获取相关信息

名称栏目:shell脚本-通过lftp同步远端目录到本地
文章链接:http://pwwzsj.com/article/jcpgjs.html