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同步远端目录到本地
分享URL:http://ybzwz.com/article/jcpgjs.html
( 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同步远端目录到本地
分享URL:http://ybzwz.com/article/jcpgjs.html