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://myzitong.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同步远端目录到本地
网站地址:http://myzitong.com/article/jcpgjs.html