我经常从ftp服务器(我无法控制,btw)下载日志文件,而且每次下载整个文件似乎都是rediciolus.
所以我正在寻找一个程序(linux-ish)或Perl模块,它在某种程度上结合了ftp和rsync,并且只"更新"文件.
日志文件不断增长.
有什么类似的吗?
Install curlftpfs (if on Windows, use cygwin) # Create local mount path mkdir -p /mnt/myftp # Mount the destination ftp site using curlftpfs curlftpfs -o allow_other ftp://myusername:mypassword@ftp.mydomain.com /mnt/myftp # rsync inplace using append option # use a long timeout value as the first long phase # (the inplace comparison) takes a while rsync -rzvvv --inplace --append --progress --stats --timeout=7200 /mnt/myftp/path/to/source/file.log /path/to/local/destination/file.log # When you need to umount the ftp site sudo umount myftp # You can also mount from /etc/fstab by appending the following line # curlftpfs#myusername:mypassword@ftp.mydomain.com /mnt/myftp fuse allow_other,rw,user,noauto 0 0 # References: # http://linux.byexamples.com/archives/344/mounting-ftp-host-to-local-directory-on-top-of-fuse/ # http://lists.samba.org/archive/rsync/2007-May/017762.html