1.ftp自动上传文件脚本 #!/bin/bash ftp -n<<! open 192.168.220.129 user ls toor binary hash cd /path/to/backup lcd /path/to/need/backup prompt mkdir `date +"%Y%m%d"` cd `date +"%Y%m%d"` mput * close bye ! open行--要备份到的主机IP user行--ls为要备份到的主机
Linux scp命令: Upload to remote :复制本地文件到远程 Part1: Scp -P port local_file remote_user@remote_ip:remote_file SCP -P port -r local_dir remote_user@remote_ip:remote_dir # local_dir must exist ,else will occur error Part2: Dowmload from remote 复制远程文件到