Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1723

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1723

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1723

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1723

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1723

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1723

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1723

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1723
{"id":34,"date":"2011-12-16T22:04:14","date_gmt":"2011-12-17T06:04:14","guid":{"rendered":"http:\/\/blog.unethost.com\/?p=34"},"modified":"2014-04-16T16:34:36","modified_gmt":"2014-04-16T08:34:36","slug":"rsyncd_backup_server_mode","status":"publish","type":"post","link":"https:\/\/blog.unethost.com\/rsyncd_backup_server_mode\/","title":{"rendered":"\u5099\u4efd\u4e3b\u6a5f– \u4f7f\u7528rsyncd"},"content":{"rendered":"

\u6709\u6642\u5019\uff0c\u6703\u6709\u4e00\u7a2e\u9700\u6c42\uff0c\u5c31\u662f\u5169\u53f0\u7368\u7acb\u4e3b\u6a5f\u4e4b\u9593\uff0c\u5e38\u5e38\u9700\u8981\u505a\u5feb\u901f\u7684\u9060\u7aef\u5099\u5206\u3002\u9019\u7a2e\u6642\u5019\uff0crsyncd\u7684server mode\u5c31\u6d3e\u4e0a\u7528\u5834\u4e86\u3002<\/p>\n

server \u7aef\uff1a
\n(1) \u900f\u904eWHM \uff0c\u53bb\u958b\u555f873\u9019\u500bport\u7684firewall<\/p>\n

(2) mkdir \/home\/bk_server1
\nmkdir \/home\/bk_server2<\/p>\n

(3) \u5beb\u597d \/etc\/rsyncd.conf
\n<pre>
\npid file = \/var\/run\/rsyncd.pid
\nlock file = \/var\/run\/rsync.lock
\nlog file = \/var\/log\/rsyncd.log #<\/p>\n

[server1]
\npath = \/home\/bk_server1
\nauth users = bk_user
\nuid = root
\ngid = root
\nsecrets file = \/etc\/rsyncd.secrets
\nread only = no<\/p>\n

[server2]
\npath = \/home\/bk_server2
\nauth users = bk_user
\nuid = root
\ngid = root
\nsecrets file = \/etc\/rsyncd.secrets
\nread only = no
\n<\/pre>
\n(4) \u5bebserver side\u7684\u5bc6\u78bc\u6a94
\nvi \/etc\/rsyncd.secrets
\n<pre>
\nbk_user:XXXXXXXXXXXXXXX
\n<\/pre><\/p>\n

\u5bc6\u78bc\u6a94\u8a2d\u7f6e\u5b8c\u5f8c\uff0c
\nchown root:root \/etc\/rsyncd.secrets
\nchmod 600 \/etc\/rsyncd.secrets<\/p>\n

(5) \u4fee\u6539 \/etc\/xinetd.d\/rsync
\n\u5c07 disable = yes \u6539\u6210 disable = no<\/p>\n

(6) service xinetd restart<\/p>\n

(7) \u78ba\u8a8d xinetd \u6709\u6c92\u6709\u53bb\u807d rsync\u7684 873 port
\nnetstat -ntlp |grep 873
\n( \u5fc5\u9808\u51fa\u73fe\u624d\u662f\u5408\u7406\u7684\u3002)<\/p>\n

client \u7aef\uff1a
\n(1) vi \/root\/rsyncd.secrets
\n\u6ce8\u610f\uff0c\u5167\u5bb9\u7684\u683c\u5f0f\u548c server\u7aef\u7684\u4e0d\u540c\uff0c\u53ea\u6709\u5bc6\u78bc\uff0c\u800c\u6c92\u6709user name
\nXXXXXXXXXXXXX<\/p>\n

(2) chmod 600 \/root\/rsyncd.secrets<\/p>\n

(3) \u7528\u4e0b\u5217\u7684command\u5c31\u53ef\u4ee5sync\u4e86\u3002
\n\u4f8b\u5982\uff0c\u5c07client side\u7684 \/root\uff0c\u5099\u5206\u5230 server \u7aef\u7684 \/home\/bk_server1
\n<pre>
\nrsync -avHz –password-file=\/root\/rsyncd.secrets \/root bk_user@yourhost.com::server1
\n<\/pre>
\n(4) \u5728crontab \u4e2d\uff0c\u52a0\u5165\u4e0a\u8ff0\u7684command<\/p>\n","protected":false},"excerpt":{"rendered":"

\u6709\u6642\u5019\uff0c\u6703\u6709\u4e00\u7a2e\u9700\u6c42\uff0c\u5c31\u662f\u5169\u53f0\u7368\u7acb\u4e3b\u6a5f\u4e4b\u9593\uff0c\u5e38\u5e38\u9700\u8981\u505a\u5feb\u901f\u7684\u9060\u7aef\u5099\u5206\u3002\u9019\u7a2e\u6642\u5019\uff0crsyncd\u7684server m … \u95b1\u8b80\u5168\u6587 \u5099\u4efd\u4e3b\u6a5f– \u4f7f\u7528rsyncd<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[3],"tags":[12,112],"_links":{"self":[{"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/posts\/34"}],"collection":[{"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":3,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":434,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/posts\/34\/revisions\/434"}],"wp:attachment":[{"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.unethost.com\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}