{"id":267388,"date":"2023-03-20T14:05:16","date_gmt":"2023-03-20T06:05:16","guid":{"rendered":"https:\/\/lrxjmw.cn\/xhsyrmlsxycw.html"},"modified":"2023-03-20T14:05:16","modified_gmt":"2023-03-20T06:05:16","slug":"xhsyrmlsxycw","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/xhsyrmlsxycw.html","title":{"rendered":"\u5b66\u4f1a\u4f7f\u7528rsync\u547d\u4ee4\uff0c\u5b9e\u73b0\u8fdc\u7a0b\u6587\u4ef6\u540c\u6b65\uff01"},"content":{"rendered":"

rsync\u8fdc\u7a0b\u540c\u6b65<\/p>\n

\u4e00 \u5173\u4e8ersync<\/p>\n

\u00b7rsync\u8fdc\u7a0b\u540c\u6b65<\/p>\n

rsync(Remote Sync) \u662f\u4e00\u4e2aUnix\/linux\u7cfb\u7edf<\/a>\u4e0b\u7684\u6587\u4ef6\u540c\u6b65\u548c\u4f20\u8f93\u5de5\u5177\u3002Rsync\u901a\u8fc7\u201crsync\u7b97\u6cd5\u201d\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5ba2\u6237\u673a\u548c\u8fdc\u7a0b\u6587\u4ef6\u670d\u52a1\u5668\u7684\u6587\u4ef6\u540c\u6b65\u7684\u5feb\u901f\u6280\u5de7\u3002\u6bcf\u6b21\u53ea\u4f20\u9001\u4e24\u4e2a\u6587\u4ef6\u7684\u4e0d\u540c\u90e8\u4efd(\u5373\u652f\u6301\u589e\u91cf\u5907\u4efd)\uff0c\u800c\u4e0d\u662f\u6bcf\u6b21\u90fd\u6574\u4efd\u4f20\u9001<\/p>\n

\u00b7rsync\u7684\u7279\u70b9<\/p>\n

\u80fd\u66f4\u65b0\u6574\u4e2a\u76ee\u5f55\u6811\u548c\u6587\u4ef6\u7cfb\u7edf\uff1b<\/p>\n

\u6709\u9009\u62e9\u6027\u7684\u4fdd\u6301\u7b26\u53f7\u94fe\u94fe\u3001\u786c\u94fe\u63a5\u3001\u6587\u4ef6\u5c5e\u6027\u3001\u6743\u9650\u3001\u8bbe\u5907\u4ee5\u53ca\u65f6\u95f4\u7b49\uff1b<\/p>\n

\u4f20\u8f93\u524d\u6267\u884c\u538b\u7f29\uff0c\u56e0\u6b64\u7279\u522b\u9002\u7528\u4e8e\u5f02\u5730\u5907\u4efd\u3001\u955c\u50cf\u670d\u52a1\u5668\u7b49\u5e94\u7528\u3002<\/p>\n

\u80fd\u7528rsh\u3001ssh<\/a> \u6216\u76f4\u63a5\u7aef\u53e3\u505a\u4e3a\u4f20\u8f93\u7aef\u53e3\uff1b<\/p>\n

\u652f\u6301\u533f\u540drsync \u540c\u6b65\u6587\u4ef6\uff0c\u662f\u7406\u60f3\u7684\u955c\u50cf\u5de5\u5177\uff1b<\/p>\n

Rsync\u53ef\u4ee5\u901a\u8fc7rsh\u6216ssh\u4f7f\u7528\uff0c\u4e5f\u80fd\u4ee5daemon\u6a21\u5f0f\u53bb\u8fd0\u884c\uff0c\u5728\u4ee5daemon\u5f62\u5f0f\u8fd0\u884c\u65f6Rsync server\u4f1a\u6253\u5f00\u4e00\u4e2a873\u7aef\u53e3\uff0c\u7b49\u5f85\u5ba2\u6237\u7aef\u53bb\u8054\u63a5<\/p>\n

\u5b98\u65b9\u7f51\u7ad9\uff1a<\/p>\n

\u00b7rsync\u7684\u5de5\u4f5c\u6d41\u7a0b<\/p>\n

\u5728\u8fdc\u7a0b\u540c\u6b65\u4efb\u52a1\u4e2d\uff0c\u8d1f\u8d23\u53d1\u8d77rsync\u540c\u6b65\u64cd\u4f5c\u7684\u5ba2\u6237\u673a\u79f0\u4e3a\u53d1\u8d77\u7aef\uff0c\u800c\u8d1f\u8d23\u54cd\u5e94\u6765\u81ea\u98de\u673a\u7684rsync\u540c\u6b65\u64cd\u4f5c\u7684\u670d\u52a1\u5668\u79f0\u4e3a\u5907\u4efd\u6e90\u3002\u5728\u4e0b\u884c\u540c\u6b65\uff08\u4e0b\u8f7d\uff09\u4e2d\uff0c\u5907\u4efd\u6e90\u8d1f\u8d23\u63d0\u4f9b\u6587\u6863\u7684\u539f\u59cb\u4f4d\u7f6e\uff0c\u53d1\u8d77\u7aef\u5e94\u5bf9\u8be5\u4f4d\u7f6e\u5177\u6709\u8bfb\u53d6\u6743\u9650\uff1b\u5728\u4e0a\u884c\u540c\u6b65\uff08\u4e0a\u4f20\uff09\u4e2d\uff0c\u5907\u4efd\u6e90\u8d1f\u8d23\u63d0\u4f9b\u6587\u6863\u7684\u76ee\u6807\u4f4d\u7f6e\uff0c\u53d1\u8d77\u7aef\u5e94\u5bf9\u8be5\u4f4d\u7f6e\u5177\u6709\u5199\u5165\u6743\u9650\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n

linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65windows\u65f6\u95f4<\/p>\n

\u00b7rsync\u540c\u6b65\u6e90<\/p>\n

\u4f7f\u7528rsync\u540c\u6b65\u5de5\u5177\u65f6\uff0c\u5907\u4efd\u6e90\u65e2\u53ef\u4ee5\u662fSSH\u670d\u52a1\u5668\uff0c\u4e5f\u53ef\u4ee5\u662f\u4ee5\u670d\u52a1\u5668\u6a21\u5f0f\u8fd0\u884c\u7684rsync\u7a0b\u5e8f\uff08\u672c\u6587\u4ee5RHEL6\u7cfb\u7edf\u4e2d\u7684rsync-3.0.6-5\u4e3a\u4f8b\u8bb2\u89e3\uff09<\/p>\n

\u6307\u5907\u4efd\u64cd\u4f5c\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u4e5f\u79f0\u4e3a\u5907\u4efd\u6e90<\/p>\n

\u4e3b\u8981\u5305\u62ec\u4e24\u79cd\uff1arsync\u6e90\u3001SSH\u6e90<\/p>\n

RHEL6\u7cfb\u7edf\u4e2d\u7684rsync\u9ed8\u8ba4\u5df2\u5b89\u88c5<\/p>\n

\u00b7rsync\u547d\u4ee4<\/a>\u7684\u57fa\u672c\u7528\u6cd5<\/p>\n

\u683c\u5f0f\uff1arsync \u3010\u9009\u9879\u3011 \u6e90\u6587\u4ef6 \u76ee\u6807\u6587\u4ef6<\/p>\n

\u5e38\u89c1\u7684\u9009\u9879\uff1a<\/p>\n

-a\uff0c--archive \u5f52\u6863\u6a21\u5f0f\uff0c\u8868\u793a\u4ee5\u9012\u5f52\u7684\u5f62\u5f0f\u4f20\u8f93\u6587\u4ef6\uff0c\u5e76\u4e14\u4fdd\u6301\u6587\u4ef6\u5c5e\u6027\uff0c\u7b49\u540c\u4e8e-rlptgoD<\/p>\n

-r\uff0c\u2013recursive \u5bf9\u5b50\u76ee\u5f55\u4ee5\u9012\u5f52\u6a21\u5f0f\u5904\u7406<\/p>\n

-l,--links \u8868\u793a\u62f7\u8d1d\u94fe\u63a5\u6587\u4ef6<\/p>\n

-p , --perms \u8868\u793a\u4fdd\u6301\u6587\u4ef6\u539f\u6709\u6743\u9650<\/p>\n

-t , --times \u8868\u793a\u4fdd\u6301\u6587\u4ef6\u539f\u6709\u65f6\u95f4<\/p>\n

-g , --group \u8868\u793a\u4fdd\u6301\u6587\u4ef6\u539f\u6709\u5c5e\u7528\u6237\u7ec4<\/p>\n

-o , --owner \u8868\u793a\u4fdd\u6301\u6587\u4ef6\u539f\u6709\u5c5e\u4e3b<\/p>\n

-D , --devices \u8868\u793a\u5757\u8bbe\u5907\u6587\u4ef6\u4fe1\u606f<\/p>\n

-z , --compress \u8868\u793a\u538b\u7f29\u4f20\u8f93<\/p>\n

-H \u8868\u793a\u786c\u8054\u63a5\u6587\u4ef6<\/p>\n

-A \u4fdd\u7559ACL\u5c5e\u6027\u4fe1\u606f<\/p>\n

-P \u663e\u793a\u4f20\u8f93\u8fdb\u5ea6<\/p>\n

-u, --update \u4ec5\u4ec5\u8fdb\u884c\u66f4\u65b0\uff0c\u4e5f\u5c31\u662f\u8df3\u8fc7\u6240\u6709\u65e9\u5df2\u5b58\u5728\u4e8e\u76ee\u6807\u4f4d\u7f6e\uff0c\u5e76\u4e14\u6587\u4ef6\u65f6\u95f4\u665a\u4e8e\u8981\u5907\u4efd\u7684\u6587\u4ef6\u3002(\u4e0d\u8986\u76d6\u66f4\u65b0\u7684\u6587\u4ef6)<\/p>\n

--port=PORT \u6307\u5b9a\u5176\u4ed6\u7684rsync\u670d\u52a1\u7aef\u53e3<\/p>\n

--delete \u5220\u9664\u8fd9\u4e9b\u76ee\u6807\u4f4d\u7f6e\u6709\u800c\u539f\u59cb\u4f4d\u7f6e\u6ca1\u6709\u7684\u6587\u4ef6<\/p>\n

--password-file=FILE \u4eceFILE\u4e2d\u5f97\u5230\u5bc6\u7801<\/p>\n

--bwlimit=KBPS \u9650\u5236I\/O\u5e26\u5bbd\uff0cKBytes \/second<\/p>\n

--filter \u201c- \u6587\u4ef6\u540d\u201d\u9700\u8981\u8fc7\u6ee4\u7684\u6587\u4ef6<\/p>\n

--exclude= \uff1a\u9700\u8981\u8fc7\u6ee4\u7684\u6587\u4ef6<\/p>\n

-v \u663e\u793a\u540c\u6b65\u8fc7\u7a0b\u7684\u8be6\u5c3d\u4fe1\u606f<\/p>\n

\u4e8c SSH\u5907\u4efd\u6e90\u4e0e\u53d1\u8d77\u7aef\u7684\u914d\u7f6e<\/p>\n

\u00b7\u914d\u7f6eSSH\u5907\u4efd\u6e90<\/p>\n

\u4f7f\u7528SSH\u5408\u540c\u7684\u7528\u5904\u662f\u624d\u80fd\u57fa\u4e8e\u66f4\u5b89\u5168\u7684\u8fdc\u7a0b\u8054\u63a5\uff0c\u589e\u5f3a\u5907\u4efd\u7684\u4fdd\u5bc6\u6027\u3002\u8fd9\u79cd\u5f62\u5f0f\u7684\u5907\u4efd\u6e90\u6700\u5bb9\u6613\u914d\u7f6e\uff0c\u53ea\u8981\u786e\u8ba4\u6e90\u6587\u4ef6\u5939\u7684\u4f4d\u7f6e\uff0c\u5e76\u6253\u7b97\u4e00\u4e2a\u5907\u4efd\u64cd\u4f5c\u7528\u6237\u5373\u53ef<\/p>\n

\u4ee5\u670d\u52a1A\uff08\u5907\u4efd\u6e90\uff09\u4e3a\u4f8b\uff0c\u82e5\u8981\u5c06\u7f51\u7ad9\u76ee\u5f55\/var\/www\/html\u4f5c\u4e3a\u5907\u4efd\u6e90\uff0c\u5141\u8bb8\u7528\u6237rget\u505a\u4e0b\u884c\u5907\u4efd\uff0c\u7528\u6237rput\u505a\u4e0a\u884c\u5907\u4efd<\/p>\n

1\u5728\u5907\u4efd\u6e90\u670d\u52a1\u5668\uff08IP192.168.1.1\uff09\u4e0a\u65b0\u5efa\u5907\u4efd\u7528\u6237rget\u3001rput\uff0c\u5206\u522b\u62ff\u6765\u4e0b\u8f7d\u3001\u4e0a\u4f20<\/p>\n

\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65windows\u65f6\u95f4_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4<\/p>\n

2\u786e\u8ba4sshd\u670d\u52a1\u6b63\u5e38\u8fd0\u884c\uff0c\u4e14\u51c6\u8bb8\u7528\u6237rget\u3001rput\u80fd\u8bbf\u95eessh\u670d\u52a1\u5668<\/p>\n

\u5728\/etc\/ssh\/sshd_config\u6587\u4ef6\u4e2d\u6dfb\u5982\u4e0b\u914d\u7f6e\u9879\uff0c\u53ea\u5bb9\u8bb8rget\u548crput\u80fd\u8fdc\u7a0b\u767b\u9646ssh\u670d\u52a1\u5668\u3002\u5e76\u91cd\u542fsshd\u670d\u52a1\uff0c\u786e\u4fdd\u66f4\u6539\u751f\u6548\u3002<\/p>\n

linux\u540c\u6b65windows\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4<\/p>\n

3\u8c03\u6574\u5907\u4efd\u6e90\u6240\u63d0\u4f9b\u6587\u6863\u6240\u5728\u76ee\u5f55\u7684\u6743\u9650\uff08\u5982\/var\/www\/html\u76ee\u5f55\uff09\uff0c\u4f7frget\u7528\u6237\u6709\u6743\u8bfb\u53d6\u3001rput\u7528\u6237\u6709\u6743\u5199\u5165<\/p>\n

\u5728linux\u7cfb\u7edf\u4e2d\uff0c\u6b63\u5e38\u521b\u5efa\u7684\u76ee\u5f55\u6743\u9650\u4e3a755\uff0c\u6587\u4ef6\u6743\u9650\u4e3a644\uff0c\u56e0\u6b64\u5bf9\u4e8erget\u7528\u6237\u6765\u8bf4\uff0c\u9ed8\u8ba4\u6743\u9650\u65e9\u5df2\u6ee1\u8db3\u4e0b\u884c\u5907\u4efd\u7684\u8981\u6c42<\/p>\n

linux\u540c\u6b65windows\u65f6\u95f4_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux<\/p>\n

\u4f46\u662f\u5bf9\u4e8erput\u7528\u6237\u6765\u8bf4\uff0c\u8981\u624d\u80fd\u5199\u5165\u624d\u6709\u6743\u9650\u505a\u4e0a\u884c\u5907\u4efd\uff0c\u5efa\u8bae\u4f7f\u7528ACL\u8bbf\u95ee\u63a7\u5236\u673a\u5236\u8bbe\u7f6e\u7528\u6237rput\u5bf9\/var\/www\/html\u7684\u5199\u5165\u6743\u9650\uff08\u4e0d\u6539\u53d8\u5176\u4ed6\u7528\u6237\u5bf9\u8be5\u76ee\u5f55\u7684\u539f\u6709\u6743\u9650\uff0c\u5982httpd\u670d\u52a1\u7684\u8fd0\u884c\u7528\u6237daemon\u5bf9\u8be5\u76ee\u5f55\u5177\u6709\u7684\u6743\u9650\uff09<\/p>\n

\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_linux\u540c\u6b65windows\u65f6\u95f4<\/p>\n

\u5176\u4e2d\u201d-R\u201d\u9009\u9879\u8868\u793a\u9012\u5f52\u64cd\u4f5c\uff0c\u201d-m\u201d\u9009\u9879\u8868\u793a\u66f4\u6539\u6743\u9650\uff0cdefault\u8868\u793a\u5728html\/\u76ee\u5f55\u65b0\u5efa\u7684\u6587\u6863\u7528\u6237rput\u4e5f\u5177\u6709rwx\u6743\u9650\u3002\u5f53\u987b\u8981\u6d88\u9664\u6240\u8bbe\u7f6e\u7684ACL\u5c5e\u6027\u65f6\uff0csetfacl\u547d\u4ee4\u7684-x\u6216-b\u9009\u9879\uff0c\u5206\u522b\u8868\u793a\u62ff\u6765\u67d0\u4e9b\u5220\u6389\u548c\u5168\u90e8\u5220\u6389\u3002\u5230\u6b64SSH\u5907\u4efd\u6e90\u914d\u7f6e\u5b8c\u6bd5<\/p>\n

\u00b7\u53d1\u8d77\u7aef\u7684SSH\u5907\u4efd\u64cd\u4f5c\u793a\u4f8b<\/p>\n

\u6709\u4e86SSH\u5907\u4efd\u6e90\u670d\u52a1\u5668\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528rsync\u5de5\u5177\u5728\u53d1\u8d77\u7aef\u6765\u6267\u884c\u8fdc\u7a0b\u540c\u6b65\u4e86\uff1b\u5b9e\u9645\u4e0a\u5907\u4efd\u6e90\u4e0e\u53d1\u8d77\u7aef\u53ef\u4ee5\u662f\u540c\u4e00\u53f0\u4e3b\u673a\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux<\/strong>\uff0c\u5176\u7597\u6548\u76f8\u5f53\u4e8e\u672c\u5730\u5907\u4efd\u800c\u4e0d\u662f\u5f02\u5730\u5907\u4efd<\/p>\n

\u5c06\u670d\u52a1\u5668192.168.1.1\u4e2d\u7684\/var\/www\/html\u6587\u4ef6\u5939\u4e0e\u5ba2\u6237\u673a\uff08192.168.1.2\uff09\u672c\u5730\u7684\/wwwroot\u6587\u4ef6\u5939\u8fdb\u884c\u540c\u6b65\uff0c\u4fdd\u6301\u6587\u4ef6\u6743\u9650\u548c\u5c5e\u6027\u3001\u8f6f\/\u786c\u94fe\u63a5\u3001ACL\u5c5e\u6027\u3001\u5220\u9664\/wwwroot\u76ee\u5f55\u4e2d\u591a\u4f59\u7684\u6587\u4ef6\uff0c\u5e76\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u8fdb\u884c\u538b\u7f29<\/p>\n

\u4e0b\u884c\u540c\u6b65SSH\u5907\u4efd\u6e90\uff1a<\/p>\n

1\u786e\u4fdd\u5907\u4efd\u6e90\u670d\u52a1\u5668\u4e2d\/var\/www\/html\u76ee\u5f55\u4e0b\u6709\u6587\u4ef6<\/p>\n

2\u5728\u53d1\u8d77\u7aef\u5ba2\u6237\u673a\u4e0a\u6253\u7b97\u76ee\u6807\u76ee\u5f55<\/p>\n

3\u5728\u5ba2\u6237\u673a\u4e0a\u6267\u884crsync\u547d\u4ee4\u5b9e\u73b0\u4e0b\u884c\u540c\u6b65<\/p>\n

linux\u540c\u6b65windows\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4<\/p>\n

4\u9a8c\u8bc1\u540c\u6b65\u7ed3\u679c<\/p>\n

\u4e0a\u884c\u540c\u6b65SSH\u5907\u4efd\u6e90\uff1a<\/p>\n

\u5c06\u5ba2\u6237\u673a\u4e2d\u7684\/usr\/share\/doc\/HTML\/\u76ee\u5f55\u4e2d\u7684\u5185\u5bb9\u4e0a\u4f20\u540c\u6b65\u5230SSH\u670d\u52a1\u5668\u7684\/var\/www\/html\u76ee\u5f55\u4e0b\uff0c\u7531\u4e8e\u5907\u4efd\u7528\u6237rput\u5e76\u975eroot\u7528\u6237\uff0c\u56e0\u6b64\u201d-g\u201d\u3001\u201d-o\u201d\u7b49\u9009 \u9879\u5c06\u96be\u4ee5\u4f7f\u7528<\/p>\n

\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_linux\u540c\u6b65windows\u65f6\u95f4<\/p>\n

\u00b7\u7f16\u5199rsync\u5907\u4efd\u811a\u672c<\/p>\n

\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u4e2d\u7684\u5907\u4efd\u5de5\u4f5c\u4e00\u822c\u662f\u6309\u8ba1\u5212\u91cd\u590d\u6267\u884c\u7684\uff0c\u4f8b\u5982\u6bcf\u5929\u4e0a22:30\u5bf9\u670d\u52a1\u5668\u7f51\u7ad9\u76ee\u5f55\u505a\u4e00\u6b21\u4e0b\u884c\u540c\u6b65\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux<\/strong>\uff0c\u5b9a\u671f\u4efb\u52a1\u53ef\u4ee5\u4ea4\u7ed9 crond\u670d\u52a1\u6765\u5b8c\u6210\uff0c\u800c\u5b9e\u9645\u7684\u5907\u4efd\u64cd\u4f5c\u5219\u53ef\u4ee5\u8bb2\u5230shell\u811a\u672c\u4e2d<\/p>\n

\u7531\u4e8e\u8ba1\u5212\u5907\u4efd\u4e2d\u7684\u811a\u672c\u5728\u540e\u53f0\u6267\u884c\uff0c\u65e0\u6cd5\u6309\u7167\u63d0\u793a\u6765\u8f93\u5165\u5bc6\u7801\uff0c\u56e0\u6b64\u7f16\u64b0rsync\u5907\u4efd\u811a\u672c\u65f6\u600e\u4e48\u89e3\u51b3\u4ea4\u4e92\u9a8c\u8bc1\u7684\u95ee\u9898\u5c31\u6210\u4e3a\u5173\u952e\u6240\u5728<\/p>\n

SSH\u5907\u4efd\u6e90\u7684\u65e0\u4ea4\u4e92\u9a8c\u8bc1\uff1a<\/p>\n

\u5bf9\u4e8eSSH\u670d\u52a1\u5668\u6765\u8bf4\uff0c\u91c7\u7528\u79d8\u94a5\u9a8c\u8bc1\u662f\u9632\u6b62\u4ea4\u4e92\u5f0f\u767b\u9646\u7684\u6700\u4f73\u65b9\u5f0f\uff0c\u53ea\u8981\u5728\u5ba2\u6237\u673a\u4e2d\u521b\u5efa\u65e0\u516c\u94a5\u53e5\u5b50\u7684\u79d8\u94a5\u5bf9\uff0c\u7136\u540e\u5c06\u79c1\u94a5\u6587\u4ef6\u5206\u53d1\u7ed9\u670d\u52a1\u5668\u4e2d\u7684\u5907\u4efd\u7528\u6237\uff0c\u5c31\u53ef\u4ee5\u5b9e\u73b0\u65e0\u5bc6\u7801\u624b\u52a8\u767b\u5165\u4e86<\/p>\n

1\u5728\u5ba2\u6237\u673a\u4e0a\u521b\u5efa\u79d8\u94a5\u5bf9<\/p>\n

linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65windows\u65f6\u95f4<\/p>\n

2\u5c06\u79c1\u94a5\u6587\u4ef6\u5206\u53d1\u7ed9\u670d\u52a1\u5668<\/p>\n

\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65windows\u65f6\u95f4_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4<\/p>\n

3\u5728\u5ba2\u6237\u673a\u6d4b\u8bd5SSH\u7684\u79d8\u94a5\u9a8c\u8bc1<\/p>\n

linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65windows\u65f6\u95f4<\/p>\n

\u6210\u529f\u5b9e\u73b0\u514d\u4ea4\u4e92\u624b\u52a8\u767b\u5165\u540e\uff0c\u518d\u6b21\u4f7f\u7528rsync\u8bbf\u95eeSSH\u5907\u4efd\u6e90\u65f6\uff0c\u4e5f\u5c31\u4e0d\u518d\u63d0\u793a\u987b\u8981\u5bc6\u7801\u9a8c\u8bc1\u4e86\uff0c\u6ce8\u610f\uff0c\u6267\u884c\u811a\u672c\u7684\u5fc5\u987b\u662f\u5728\u5ba2\u6237\u673a\u4e2d\u521b\u521b\u5efa\u79d8\u94a5\u5bf9\u7684\u7528\u6237<\/p>\n

\u811a\u672c\u5185\u5bb9\u5982\u4e0b<\/p>\n

linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_linux\u540c\u6b65windows\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux<\/p>\n

1\u5bf9\u5efa\u597d\u7684\u5907\u4efd\u811a\u672c\u8bbe\u7f6e\u9002\u5f53\u6743\u9650<\/p>\n

2\u521b\u5efacrond\u8ba1\u5212\u4efb\u52a1<\/p>\n

\u6bcf\u592922:30\u6267\u884c\u811a\u672c<\/p>\n

\u4e09 rsync\u5907\u4efd\u6e90\u4e0e\u53d1\u8d77\u7aef\u7684\u914d\u7f6e<\/p>\n

rsync\u9664\u4e86\u4ec5\u7528\u4f5c\u8fdc\u7a0b\u540c\u6b65\u7684\u53d1\u8d77\u7aef\uff08\u5ba2\u6237\u7aef\uff09\uff0c\u4e5f\u53ef\u4ee5\u4f5c\u4e3a\u5b88\u62a4\u8fdb\u7a0b\u8fd0\u884c\uff0c\u4e3a\u5176\u4ed6\u5ba2\u6237\u673a\u63d0\u4f9b\u5907\u4efd\u6e90\uff0c\u914d\u7f6ersync\u5907\u4efd\u6e90\u987b\u8981\u6784\u5efa\u914d\u7f6e\u6587\u4ef6 rsync.conf\uff0c\u521b\u5efa\u5907\u4efd\u5e10\u6237\uff0c\u7136\u540e\u5c06rsync\u7a0b\u5e8f\u4ee5\u201d- -daemon\u201d\u9009\u9879\u8fd0\u884c<\/p>\n

\u00b7\u914d\u7f6ersync\u5907\u4efd\u6e90<\/p>\n

1\u6784\u5efa\/etc\/rsyncd.conf\u914d\u7f6e\u6587\u4ef6<\/p>\n

\u914d\u7f6e\u6587\u4ef6rsyncd.conf\u5750\u843d\/etc\/\u76ee\u5f55\u4e0b\uff0c\u9700\u81ea\u884c\u6784\u5efa\uff0c\u914d\u7f6e\u5185\u5bb9\u7684\u683c\u5f0f\u4e0esamba\u670d\u52a1\u5668\u7c7b\u4f3c\uff0c\u5177\u4f53\u53ef\u4ee5\u53c2\u8003man\u6307\u5357\u9875\uff0c\u4e0b\u9762\u5c06\u4ee5\u6e90\u76ee\u5f55\/var\/www\/html\u3001\u5907\u4efd\u5e10\u53f7backuper\u4e3a\u4f8b<\/p>\n

linux\u540c\u6b65windows\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4<\/p>\n

\u57fa\u4e8e\u5b89\u5168\u6027\u8003\u8651\uff0c\u5bf9\u4e8ersync \u7684\u5907\u4efd\u6e90\u6700\u597d\u4ec5\u5bb9\u8bb8\u4ee5\u53ea\u8bfb\u65b9\u6cd5\u505a\u4e0b\u884c\u540c\u6b65\uff0c\u82e5\u786e\u5b9e\u987b\u8981\u505a\u4e0a\u884c\u540c\u6b65\u65f6\uff0c\u5efa\u8bae\u6539\u7528SSH\u5907\u4efd\u6e90\u3002\u53e6\u5916\uff0c\u4e0b\u884c\u5907\u4efd\u53ef\u4ee5\u91c7\u7528\u533f\u540d\u7684\u5f62\u5f0f\uff0c\u53ea\u8981\u5c06\u5176\u4e2d\u7684\u201dauth users\u201d\u548c\u201dsecrets file\u201d\u914d\u7f6e\u8bb0\u5f55\u9664\u53bb\u5c31\u53ef\u4ee5\u4e86<\/p>\n

\u4e0b\u9762\u662f\u5e38\u89c1\u7684\u5168\u5c40\u914d\u7f6e\u53c2\u6570\uff0c<\/p>\n

port\uff1a\u6307\u5b9a\u540e\u53f0\u7a0b\u5e8f\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\uff0c\u9ed8\u8ba4\u4e3a873\u3002<\/p>\n

uid\uff1a\u8be5\u9009\u9879\u6307\u5b9a\u5f53\u8be5\u6a21\u5757\u4f20\u8f93\u6587\u4ef6\u65f6\u5b88\u62a4\u8fdb\u7a0b\u5e94\u5f53\u5177\u6709\u7684uid\uff0c\u914d\u5408gid\u9009\u9879\u4f7f\u7528\u53ef\u4ee5\u786e\u5b9a\u4ec0\u4e48\u53ef\u4ee5\u8bbf\u95ee\u600e\u4e48\u6837\u7684\u6587\u4ef6\u6743\u9650\uff0c\u9ed8\u8ba4\u503c\u662f\" nobody\" \u3002<\/p>\n

gid\uff1a\u8be5\u9009\u9879\u6307\u5b9a\u5f53\u8be5\u6a21\u5757\u4f20\u8f93\u6587\u4ef6\u65f6\u5b88\u62a4\u8fdb\u7a0b\u5e94\u5f53\u5177\u6709\u7684gid\u3002\u9ed8\u8ba4\u503c\u4e3a\" nobody\" \u3002<\/p>\n

max connections\uff1a\u6307\u5b9a\u8be5\u6a21\u5757\u7684\u6700\u5927\u5e76\u53d1\u8054\u63a5\u6570\u76ee\u4ee5\u4fdd\u62a4\u670d\u52a1\u5668\uff0c\u8d85\u8fc7\u9650\u5236\u7684\u8054\u63a5\u6073\u6c42\u5c06\u88ab\u544a\u77e5\u6b64\u540e\u518d\u8bd5\u3002\u9ed8\u8ba4\u503c\u662f0\uff0c\u4e5f\u5c31\u662f\u6ca1\u6709\u9650\u5236\u3002<\/p>\n

lock file\uff1a\u6307\u5b9a\u652f\u6301max connections\u53c2\u6570\u7684\u9501\u6587\u4ef6\uff0c\u9ed8\u8ba4\u503c\u662f\/var\/run\/rsyncd.lock\u3002<\/p>\n

motd file\uff1a\" motd file\" \u53c2\u6570\u62ff\u6765\u6307\u5b9a\u4e00\u4e2a\u6d88\u606f\u6587\u4ef6\uff0c\u5f53\u987e\u5ba2\u8054\u63a5\u670d\u52a1\u5668\u65f6\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\u663e\u793a\u7ed9\u987e\u5ba2\uff0c\u9ed8\u8ba4\u662f\u6ca1\u6709motd\u6587\u4ef6\u7684\u3002<\/p>\n

log file\uff1a\" log file\" \u6307\u5b9arsync\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u800c\u4e0d\u5c06\u65e5\u5fd7\u53d1\u9001\u7ed9syslog\u3002<\/p>\n

pid file\uff1a\u6307\u5b9arsync\u7684pid\u6587\u4ef6\uff0c\u901a\u5e38\u6307\u5b9a\u4e3a\u201c\/var\/run\/rsyncd.pid\u201d\uff0c\u5b58\u653e\u8fdb\u7a0bID\u7684\u6587\u4ef6\u4f4d\u7f6e\u3002<\/p>\n

hosts allow = \u5355\u4e2aIP\u5730\u5740\u6216\u7f51\u8def\u5730\u5740 \/\/\u5141\u8bb8\u8bbf\u95ee\u7684\u5ba2\u6237\u673a\u5730\u5740<\/p>\n

\u4e0b\u9762\u662f\u5e38\u89c1\u7684\u6a21\u5757\u914d\u7f6e\u53c2\u6570<\/p>\n

\u4e3b\u8981\u662f\u5b9a\u4e49\u670d\u52a1\u5668\u90a3\u4e2a\u76ee\u5f55\u8981\u88ab\u540c\u6b65\u8f93\u51fa\u3002<\/p>\n

\u5176\u683c\u5f0f\u5fc5\u987b\u4e3a\u201c[\u5171\u4eab\u6a21\u5757\u540d]\u201d\u5f62\u5f0f\uff0c\u8fd9\u4e2a\u540d\u5b50\u5c31\u662f\u5728rsync\u5ba2\u6237\u7aef\u89c1\u5230\u7684\u540d\u5b50\uff0c\u5176\u5b9e\u6709\u70b9\u8c61Samba\u670d\u52a1\u5668\u63d0\u4f9b\u7684\u5171\u4eab\u540d\u3002\u800c\u670d\u52a1\u5668\u771f\u6b63\u540c\u6b65\u7684\u6570\u636e\u662f\u901a\u8fc7 path\u6765\u6307\u5b9a\u7684\u3002<\/p>\n

Comment\uff1a\u7ed9\u6a21\u5757\u6307\u5b9a\u4e00\u4e2a\u63cf\u8ff0\uff0c\u8be5\u63cf\u8ff0\u8fde\u540c\u6a21\u5757\u540d\u5728\u987e\u5ba2\u8054\u63a5\u5f97\u5230\u6a21\u5757\u5217\u8868\u65f6\u663e\u793a\u7ed9\u987e\u5ba2\u3002\u9ed8\u8ba4\u6ca1\u6709\u63cf\u8ff0\u5b9a\u4e49\u3002<\/p>\n

Path\uff1a\u6307\u5b9a\u8be5\u6a21\u5757\u7684\u4f9b\u5907\u4efd\u7684\u76ee\u5f55\u6811\u8def\u5f84\uff0c\u8be5\u53c2\u6570\u662f\u5fc5\u987b\u6307\u5b9a\u7684\u3002<\/p>\n

read only \uff1ayes\u4e3a\u53ea\u5bb9\u8bb8\u4e0b\u8f7d\uff0cno\u4e3a\u53ef\u4ee5\u4e0b\u8f7d\u548c\u4e0a\u4f20\u6587\u4ef6\u5230\u670d\u52a1\u5668<\/p>\n

exclude\uff1a\u7528\u6765\u6307\u5b9a\u591a\u4e2a\u7531\u7a7a\u683c\u9694\u5f00\u7684\u591a\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55(\u76f8\u5bf9\u8def\u5f84)\uff0c\u5c06\u5176\u6dfb\u52a0\u5230exclude\u5217\u8868\u4e2d\u3002\u8fd9\u7b49\u540c\u4e8e\u5728\u5ba2\u6237\u7aef\u547d\u4ee4\u4e2d\u4f7f\u7528\u2014exclude\u6216----filter\u6765\u6307\u5b9a\u4e2a\u522b\u6587\u4ef6\u6216\u76ee\u5f55\u4e0d\u4e0b\u8f7d\u6216\u4e0a\u4f20(\u65e2\u4e0d\u53ef\u8bbf\u95ee)<\/p>\n

exclude from\uff1a\u6307\u5b9a\u4e00\u4e2a\u5305\u542bexclude\u6a21\u5f0f\u7684\u5b9a\u4e49\u7684\u6587\u4ef6\u540d\uff0c\u670d\u52a1\u5668\u4ece\u8be5\u6587\u4ef6\u4e2d\u8bfb\u53d6exclude\u5217\u8868\u5b9a\u4e49\uff0c\u6bcf\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\u987b\u8981\u5360\u7528\u4e00\u884c<\/p>\n

include\uff1a \u7528\u6765\u6307\u5b9a\u4e0d\u6392\u9664\u7b26\u5408\u8981\u6c42\u7684\u6587\u4ef6\u6216\u76ee\u5f55\u3002\u8fd9\u7b49\u540c\u4e8e\u5728\u5ba2\u6237\u7aef\u547d\u4ee4\u4e2d\u4f7f\u7528--include\u6765\u6307\u5b9a\u6a21\u5f0f\uff0c\u7ed3\u5408include\u548cexclude\u53ef\u4ee5\u5b9a\u4e49\u590d\u6742\u7684exclude\/include\u89c4\u5219\u3002<\/p>\n

include from\uff1a\u6307\u5b9a\u4e00\u4e2a\u5305\u542binclude\u6a21\u5f0f\u7684\u5b9a\u4e49\u7684\u6587\u4ef6\u540d\uff0c\u670d\u52a1\u5668\u4ece\u8be5\u6587\u4ef6\u4e2d\u8bfb\u53d6include\u5217\u8868\u5b9a\u4e49\u3002<\/p>\n

auth users\uff1a\u8be5\u9009\u9879\u6307\u5b9a\u7531\u7a7a\u683c\u6216\u5192\u53f7\u5206\u9694\u7684\u7528\u6237\u540d\u5217\u8868\uff0c\u53ea\u6709\u90a3\u4e9b\u7528\u6237\u624d\u51c6\u8bb8\u8054\u63a5\u8be5\u6a21\u5757\u3002\u8fd9\u91cc\u7684\u7528\u6237\u548c\u7cfb\u7edf\u7528\u6237\u6ca1\u6709\u4efb\u4f55\u5173\u7cfb\u3002\u5982\u679c\" auth users\" \u88ab\u8bbe\u7f6elinux\u662f\u4ec0\u4e48\uff0c\u90a3\u4e48\u5ba2\u6237\u7aef\u53d1\u51fa\u5bf9\u8be5\u6a21\u5757\u7684\u8054\u63a5\u6073\u6c42\u4e4b\u540e\u4f1a\u88abrsync\u6073\u6c42challenged\u8fdb\u884c\u9a8c\u8bc1\u8eab\u5206\u8fd9\u513f\u4f7f\u7528\u7684challenge\/response\u8ba4\u8bc1<\/a>\u5408\u540c\u3002\u7528\u6237\u7684\u540d\u548c\u5bc6\u7801\u4ee5\u660e\u6587\u5f62\u5f0f\u50a8\u5b58\u5728\" secrets file\" \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u4e2d\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u65e0\u9700\u5bc6\u7801\u5c31\u53ef\u4ee5\u8054\u63a5\u6a21\u5757(\u4e5f\u5c31\u662f\u533f\u540d\u65b9\u6cd5)\u3002<\/p>\n

secrets file\uff1a\u8be5\u9009\u9879\u6307\u5b9a\u4e00\u4e2a\u5305\u542b\u5b9a\u4e49\u7528\u6237\u540d:\u5bc6\u7801\u5bf9\u7684\u6587\u4ef6\u3002\u53ea\u6709\u5728\" auth users\" \u88ab\u5b9a\u4e49\u65f6\uff0c\u8be5\u6587\u4ef6\u624d\u6709\u4f5c\u7528\u3002\u6587\u4ef6\u6bcf\u884c\u5305\u542b\u4e00\u4e2ausername:passwd\u5bf9\u3002\u4e00\u822c\u6765\u8bf4\u5bc6\u7801\u6700\u597d\u4e0d\u8981\u8d85\u8fc78\u4e2a\u5b57\u7b26\u3002\u6ca1\u6709\u9ed8\u8ba4\u7684secures file\u540d\uff0c\u6ce8\u610f\uff1a\u8be5\u6587\u4ef6\u7684\u6743\u9650\u4e00\u5b9a\u8981\u662f600arm linux\uff0c\u5426\u5219\u5ba2\u6237\u7aef\u5c06\u4e0d\u80fd\u8054\u63a5\u670d\u52a1\u5668\u3002<\/p>\n

hosts allow\uff1a\u6307\u5b9a\u4ec0\u4e48IP\u7684\u987e\u5ba2\u5bb9\u8bb8\u8054\u63a5\u8be5\u6a21\u5757\u3002\u5b9a\u4e49\u53ef\u4ee5\u662f\u4ee5\u4e0b\u65b9\u5f0f\uff1a<\/p>\n

\u5355\u4e2aIP\u5730\u5740\uff0c\u4f8b\u5982\uff1a192.167.0.1\uff0c\u591a\u4e2aIP\u6216\u7f51\u5173\u987b\u8981\u7528\u7a7a\u683c\u9694\u5f00\uff0c<\/p>\n

\u6574\u4e2a\u7f51\u5173\uff0c\u4f8b\u5982\uff1a192.168.0.0\/24\uff0c\u4e5f\u53ef\u4ee5\u662f192.168.0.0\/255.255.255.0<\/p>\n

\u201c*\u201d\u5219\u8868\u793a\u6240\u6709\uff0c\u9ed8\u8ba4\u662f\u5bb9\u8bb8\u6240\u6709\u4e3b\u673a\u8054\u63a5\u3002<\/p>\n

hosts deny\uff1a\u6307\u5b9a\u4e0d\u5bb9\u8bb8\u8054\u63a5rsync\u670d\u52a1\u5668\u7684\u673a\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528hosts allow\u7684\u5b9a\u4e49\u65b9\u6cd5\u6765\u8fdb\u884c\u5b9a\u4e49\u3002\u9ed8\u8ba4\u662f\u6ca1\u6709hosts deny\u5b9a\u4e49\u3002<\/p>\n

list\uff1a\u8be5\u9009\u9879\u8bbe\u5b9a\u5f53\u987e\u5ba2\u6073\u6c42\u53ef\u4ee5\u4f7f\u7528\u7684\u6a21\u5757\u5217\u8868\u65f6\uff0c\u8be5\u6a21\u5757\u662f\u5426\u5e94\u5f53\u88ab\u5217\u4e3e\u3002\u5982\u679c\u8bbe\u7f6e\u8be5\u9009\u9879\u4e3afalse\uff0c\u53ef\u4ee5\u521b\u5efa\u9690\u85cf\u7684\u6a21\u5757\u3002\u9ed8\u8ba4\u503c\u662ftrue\u3002<\/p>\n

Timeout\uff1a\u901a\u8fc7\u8be5\u9009\u9879\u53ef\u4ee5\u8986\u76d6\u987e\u5ba2\u6307\u5b9a\u7684IP\u8d85\u65f6\u65f6\u95f4\u3002\u901a\u8fc7\u8be5\u9009\u9879\u53ef\u4ee5\u786e\u4fddrsync\u670d\u52a1\u5668\u4e0d\u4f1a\u6c38\u8fdc\u7b49\u5f85\u4e00\u4e2a\u5d29\u6e83\u7684\u5ba2\u6237\u7aef\u3002\u8d85\u65f6\u5355\u4f4d\u4e3a\u79d2\u949f\uff0c0\u8868\u793a\u6ca1\u6709\u8d85\u65f6\u5b9a\u4e49\uff0c\u8fd9\u4e5f\u662f\u9ed8\u8ba4\u503c\u3002\u5bf9\u4e8e\u533f\u540drsync\u670d\u52a1\u5668\u6765\u8bf4\uff0c\u4e00\u4e2a\u7406\u60f3\u7684\u6570\u5b57\u662f600<\/p>\n

2\u4e3a\u5907\u4efd\u5e10\u6237\u521b\u5efa\u6570\u636e\u6587\u4ef6\uff1a<\/p>\n

\u6dfb\u52a0\u4e00\u884c\u7528\u6237\u8bb0\u5f55\uff0c\u4ee5\u9017\u53f7\u5206\u9694\uff0c\u7528\u6237\u540d\u79f0\u4e3abackuper\uff0c\u5bc6\u7801\u4e3apwd123\u3002\u7531\u4e8e\u5e10\u53f7\u4fe1\u606f\u91c7\u7528\u660e\u6587\u50a8\u5b58\uff0c\u56e0\u6b64\u5e94\u8c03\u6574\u6587\u4ef6\u6743\u9650\uff0c\u907f\u514d\u5e10\u53f7\u4fe1\u606f\u6cc4\u6f0f\u3002<\/p>\n

3\u542f\u52a8rsync\u670d\u52a1\u7a0b\u5e8f<\/p>\n

\u6267\u884c\u201drsync --daemon\u201d\u547d\u4ee4\u5c31\u53ef\u4ee5\u542f\u52a8rsync\u670d\u52a1\uff0c\u4ee5\u72ec\u7acb\u7a83\u542c\u670d\u52a1\u7684\u5f62\u5f0f\u8fd0\u884c\uff0c\u82e5\u8981\u5173\u6389rsync\u670d\u52a1\uff0c\u53ef\u4ee5\u91c7\u7528kill\u8fdb\u7a0b\u7684\u5f62\u5f0f<\/p>\n

linux\u540c\u6b65windows\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4<\/p>\n

\u5c06\u201drsync --daemon\u201d\u4fdd\u5b58\u5230\/etc\/rc.local\u6587\u4ef6\u4e2d\uff0c\u786e\u4fdd\u7cfb\u7edf\u542f\u52a8\u540e\u624b\u52a8\u542f\u52a8rsync\u670d\u52a1\u3002<\/p>\n

\u6216\u8005\u53ef\u4ee5\u5c06rsync\u4ea4\u7ed9\u8d85\u7ea7\u670d\u52a1xinted\u7ba1\u7406\uff0c\u53ea\u9700\u66f4\u6539\u76f8\u5e94\u914d\u7f6e\u5e76\u542f\u52a8xinetd\u670d\u52a1\u5373\u53ef\u542f\u52a8rsync\u670d\u52a1<\/p>\n

\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65windows\u65f6\u95f4_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4<\/p>\n

\u5982\u679c\u6ca1\u6709\u5b89\u88c5xinet\u8f6f\u4ef6\u5305\uff0c\u8bf7\u5148\u5b89\u88c5<\/p>\n

4\u5728iptables\u9632\u706b\u5899\u4e0a\u521b\u5efa\u89c4\u5219\u5bb9\u8bb8873\u7aef\u53e3\u7684\u901a\u8baf<\/p>\n

\u82e5selinux\u5f00\u542f\u8981\u66f4\u6539selinux\u7684\u5e03\u5c14\u503c\uff1a<\/p>\n

\u00b7rsync\u53d1\u8d77\u7aef\u7684\u5907\u4efd\u64cd\u4f5c\u793a\u4f8b<\/p>\n

\u4f7f\u7528rsync\u5907\u4efd\u5de5\u5177\u5b9e\u73b0\u5907\u4efd\u64cd\u4f5c\u3002<\/p>\n

\u683c\u5f0f1\uff1a<\/p>\n

rsync \u9009\u9879 \u7528\u6237\u540d@\u5907\u4efd\u6e90\u670d\u52a1\u5668IP::\u5171\u4eab\u6a21\u5757\u540d \u76ee\u6807\u76ee\u5f55<\/p>\n

\u683c\u5f0f2\uff1a<\/p>\n

rsync \u9009\u9879 rsync:\/\/\u7528\u6237\u540d@\u5907\u4efd\u6e90\u670d\u52a1\u5668IP\/\u5171\u4eab\u6a21\u5757\u540d \u76ee\u6807\u76ee\u5f55<\/p>\n

1\u5728\u5ba2\u6237\u673a\u4e0a\u6267\u884crsync\u547d\u4ee4\u5b9e\u73b0\u4e0b\u884c\u540c\u6b65\u64cd\u4f5c<\/p>\n

\u5c06\u670d\u52a1\u5668\u4e2d\u7684wwwroot\u5171\u4eab\u6a21\u5757\u4e2d\u7684\u5185\u5bb9\u4e0b\u8f7d\u5230\u672c\u5730\u7684\/myweb\u3001\u76ee\u5f55\u4e2d<\/p>\n

linux\u540c\u6b65windows\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4<\/p>\n

\u6216<\/p>\n

linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_linux\u540c\u6b65windows\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux<\/p>\n

2\u7f16\u64b0rsync\u811a\u672c<\/p>\n

rsync\u5907\u4efd\u6e90\u7684\u65e0\u4ea4\u4e92\u9a8c\u8bc1\uff0c\u5bf9\u4e8ersync\u5907\u4efd\u6e90\u6765\u8bf4\uff0c\u53ef\u4f7f\u7528\u73af\u5883\u53d8\u91cfRSYNC_PASSWORD\u6765\u50a8\u5b58\u5bc6\u7801\u3002\u6267\u884c rsync\u5907\u4efd\u4efb\u52a1\u65f6\uff0c\u4f1a\u624b\u52a8\u8bfb\u53d6\u8be5\u53d8\u91cf\uff0c\u5e76\u5728\u987b\u8981\u65f6\u53d1\u9001\u7ed9rsync\u6e90\u670d\u52a1\u5668\u6765\u8fdb\u884c\u9a8c\u8bc1<\/p>\n

\u65e0\u4ea4\u4e92\u5f0f\u9a8c\u8bc1<\/p>\n

linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_linux\u540c\u6b65windows\u65f6\u95f4_\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux<\/p>\n

\u811a\u672c\u5185\u5bb9<\/p>\n

\u540c\u6b65\u65f6\u95f4\u670d\u52a1\u5668 linux_linux\u540c\u6b65\u670d\u52a1\u5668\u65f6\u95f4_linux\u540c\u6b65windows\u65f6\u95f4<\/p>\n

\u8bbe\u7f6ex\u6743\u9650\uff1a<\/p>\n

\u8bbe\u7f6e\u8ba1\u5212\u4efb\u52a1\uff0c\u5728 crond\u8ba1\u5212\u4efb\u52a1\u4e2d\u6309\u6307\u5b9a\u8ba1\u5212\u6267\u884c\u811a\u672c<\/p>\n","protected":false},"excerpt":{"rendered":"

\u662f\u4e00\u4e2aUnix\/linux\u7cfb\u7edf\u4e0b\u7684\u6587\u4ef6\u540c\u6b65\u548c\u4f20\u8f93\u5de5\u5177\u3002Rsync\u901a\u8fc7\u201crsync\u7b97\u6cd5\u201d\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5ba2\u6237\u673a\u548c\u8fdc\u7a0b\u6587\u4ef6\u670d\u52a1\u5668\u7684\u6587\u4ef6\u540c\u6b65\u7684\u5feb\u901f\u65b9\u6cd5\u3002\u4f7f\u7528rsync\u540c\u6b65\u5de5\u5177\u65f6\uff0c\u5907\u4efd\u6e90\u65e2\u53ef\u4ee5\u662fSSH\u670d\u52a1\u5668\uff0c\u4e5f\u53ef\u4ee5\u662f\u4ee5\u670d\u52a1\u5668\u6a21\u5f0f\u8fd0\u884c\u7684rsync\u7a0b\u5e8f\uff08\u672c\u6587\u4ee5RHEL6\u7cfb\u7edf\u4e2d\u7684rsync-3.\u5728\/etc\/ssh\/sshd_config\u6587\u4ef6\u4e2d\u6dfb\u5982\u4e0b\u914d\u7f6e\u9879\uff0c\u53ea\u5141\u8bb8rget\u548crput\u80fd\u8fdc\u7a0b\u767b\u5f55ssh\u670d\u52a1\u5668\u3002<\/p>\n","protected":false},"author":1,"featured_media":267389,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-267388","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/267388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=267388"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/267388\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/267389"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=267388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=267388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=267388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}