In linux, when I first discovered LFTP, the advanced LFTP mirror application noticed its powerful mirror function. Because it can pass in parameters to the mirror command to control the synchronization behavior: reverse can be uploaded to FTP, or-R delete can be used: If no file exists in the remote directory, delete the file. Only-newer: only download new text. When I just found LFTP, I noticed its powerful mirror function. Www.2cto.com, because it can pass in parameters to the mirror command to control the synchronization behavior: -- reverse upload to FTP, you can also use-R -- delete: If no file exists in the remote directory, if yes, delete the file. -- Only-newer: only download new files. The new mirror file is determined by the file size and modification time. We can use www.2cto.com -- ignore-time to block the time determination. In this way, mirror can only determine the file size, speed up synchronization. -- Exculde: does not contain a directory. -- Verbose: Detailed output. For example, mirror -- delete -- only-newer -- verbose work bak/automatically backs up the work folder of the server to the bak folder in the current local directory and deletes nonexistent files, and only download the latest file, and then provide detailed output. Use the-e Option of lftp to directly connect the command after lftp: lftp-u username, password-e "mirror -- delete -- only-newer -- verbose/work bak/" ftpIP
You can also use the at option to specify the backup time: lftp at-u username, password-e "mirror -- delete -- only-newer-verbose/work bak/" ftpIP executes the Backup Task at every day. Based on experience, ftp is much faster than rsync. If there is a large amount of data backup in the future, you should consider using ftp, so use LFTP.