{"id":177348,"date":"2020-05-01T10:44:07","date_gmt":"2020-05-01T02:44:07","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=177348"},"modified":"2020-04-20T09:47:39","modified_gmt":"2020-04-20T01:47:39","slug":"rsync-scp","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/rsync-scp.html","title":{"rendered":"rsync\u5b9e\u65f6\u540c\u6b65"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u4e0e\u4f20\u7edf\u7684cp\u3001tar\u5907\u4efd\u65b9\u5f0f\u76f8\u6bd4\uff0crsync\u5177\u6709\u5b89\u5168\u6027\u9ad8\u3001\u5907\u4efd\u8fc5\u901f\u3001\u652f\u6301\u589e\u91cf\u5907\u4efd\u7b49\u4f18\u70b9\uff0c\u901a\u8fc7rsync\u53ef\u4ee5\u89e3\u51b3\u5bf9\u5b9e\u65f6\u6027\u8981\u6c42\u4e0d\u9ad8\u7684\u6570\u636e\u5907\u4efd\u9700\u6c42\uff0c\u4f8b\u5982\u5b9a\u671f\u7684\u5907\u4efd\u6587\u4ef6\u670d\u52a1\u5668\u6570\u636e\u5230\u8fdc\u7aef\u670d\u52a1\u5668\uff0c\u5bf9\u672c\u5730\u78c1\u76d8\u5b9a\u671f\u505a\u6570\u636e\u955c\u50cf\u7b49\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
192.168.0.2 \u76ee\u6807\u670d\u52a1\u5668 \u6709\u76ee\u5f55 \/opt\/bak\/test\/<\/p>\n \u5b9e\u73b0\u7684\u76ee\u7684\u5c31\u662f\u4fdd\u6301\u8fd9\u4e24\u4e2a\u670d\u52a1\u5668\u67d0\u4e2a\u6587\u4ef6\u76ee\u5f55\u4fdd\u6301\u5b9e\u65f6\u540c\u6b65<\/p>\n \u5b9e\u73b0\u65b9\u5f0f\uff1a \u901a\u8fc7rsync+inotify-tools\u7ed3\u5408\u6765\u5b9e\u73b0<\/p>\n \u51c6\u5907\u5de5\u4f5c\uff1a<\/strong><\/div>\n \u9996\u5148\u8981\u7ed9\u4e24\u53f0\u673a\u5668\u6dfb\u52a0\u4fe1\u4efb\u5173\u7cfb\uff0c\u5177\u4f53\u65b9\u6cd5\u5df2\u7ecf\u5728\u524d\u9762\u7684\u6587\u7ae0\u4ecb\u7ecd\u8fc7\u4e86<\/p>\n \u8be6\u60c5\u67e5\u770b\uff1a linux\u6dfb\u52a0\u4fe1\u4efb\u5173\u7cfb\u514d\u5bc6\u7801\u767b\u5f55<\/p>\n \u9700\u8981\u5b89\u88c5\u8f6f\u4ef6\uff1a<\/p>\n 1. rsync \u540c\u6b65\u8f6f\u4ef6<\/strong><\/div>\n \u5728 \u6e90\u670d\u52a1\u5668 \u548c \u76ee\u6807\u670d\u52a1\u5668 \u90fd\u9700\u8981\u5b89\u88c5<\/p>\n \u6e90\u670d\u52a1\u5668\uff1a \u662frsync\u5ba2\u6237\u7aef\uff0c\u4e0d\u9700\u8981\u914d\u7f6e<\/p>\n \u76ee\u6807\u670d\u52a1\u5668\uff1a \u662frsync\u670d\u52a1\u5668\u7aef\uff0c\u9700\u8981\u914d\u7f6e\/etc\/rsyncd.conf\u91cc\u7684\u5185\u5bb9<\/p>\n 2. inotify-tools \u5de5\u5177<\/strong><\/div>\n \u8be5\u5de5\u5177\u4e3a\u6587\u4ef6\u5b9e\u65f6\u76d1\u63a7\u5de5\u5177\uff0c\u9700\u8981linux\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u652f\u6301\uff0c\u5185\u6838\u652f\u6301\u9700\u8981\u81f3\u5c11\u7248\u672c\u4e3a2.6.13<\/p>\n \u68c0\u67e5\u64cd\u4f5c\u7cfb\u7edf\u662f\u5426\u652f\u6301\uff0c\u6267\u884c\u5982\u4e0b\uff1a<\/p>\n uname -r \u67e5\u770b\u7248\u672c \u6267\u884c\uff1a<\/p>\n \r\n ll \/proc\/sys\/fs\/inotify\r\n total 0 \r\n -rw-r--r-- 1 root root 0 Oct 18 12:18 max_queued_events \r\n -rw-r--r-- 1 root root 0 Oct 18 12:18 max_user_instances \r\n -rw-r--r-- 1 root root 0 Oct 18 12:18 max_user_watches<\/pre>\n |