Remote Automatic Backup rsync + ssh + sshpass: the advantages of mutual automatic backup between remote servers (www.2cto.com rsync) The vast majority of O & M personnel know that, simply put, only the files that have been modified are backed up, reduce data transmission volume. At the same time, it can transmit data through the ssh protocol for data security. However, ssh has a disadvantage. Only the password can be entered in interactive mode. As a result, the backup program cannot be written to crontab and can only be executed manually. Automatic batch processing is not supported. And sshpass can decrypt this disadvantage, let us look at the specific: http://sourceforge.net/projects/sshpass/files/ decompress. /configure; make install to complete installation and use: www.2cto.com sshpass-p 'Password' rsync-av-e ssh localdir username @ remoteaddr:/remotedir or sshpass-f password. file rsync-av-e ssh localdir username @ remoteaddr:/remotedir where: password remote server password www.2cto.com password. file Content is password file localdir local directory to be backed up username Remote Server username remoteaddr Remote Server IP or remote server domain name remotedir remote server path ps: the rsync exclusion directory syntax is -- explode = directory name. In actual tests, the directory name cannot be an absolute address.