\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>\nsecrets 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
<\/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
<\/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
<\/p>\n
\u6216<\/p>\n
<\/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
<\/p>\n
\u811a\u672c\u5185\u5bb9<\/p>\n
<\/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}]}}