{"id":567,"date":"2022-06-16T13:45:23","date_gmt":"2022-06-16T05:45:23","guid":{"rendered":"http:\/\/www.rchen.top\/?p=567"},"modified":"2022-06-16T13:45:24","modified_gmt":"2022-06-16T05:45:24","slug":"backuppc%e5%a4%87%e4%bb%bd%e8%bd%af%e4%bb%b6%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.rchen.top\/?p=567","title":{"rendered":"Backuppc\u5907\u4efd\u8f6f\u4ef6\u5b89\u88c5"},"content":{"rendered":"<p><b>\u8f6f\u4ef6\u4ecb\u7ecd<\/b><\/p>\n<p>BackupPC\u662f\u4e00\u6b3eLinux\u5e73\u53f0\u4e0b\u7684\u4e00\u6b3e\u975e\u5e38\u7075\u6d3b\u7684\u5f00\u6e90\u7cfb\u7edf\u7cfb\u7edf\u5907\u4efd\u5de5\u5177\uff0c\u8be5\u5de5\u5177\u662f\u4e00\u79cdD2D\u7684\u5907\u4efd\u89e3\u51b3\u65b9\u6848\uff0cBackupPC\u53ea\u80fd\u8fd0\u884c\u5728Linux\u5e73\u53f0\u4e0a\uff0c\u4f46\u662f\u5374\u53ef\u4ee5\u540c\u65f6\u5907\u4efdwindows\uff0cLinux\uff0c,Mac os\u7b49\u591a\u79cd\u5e73\u53f0\u7684\u7cfb\u7edf\uff0c\u91c7\u53d6\u72ec\u6709\u7684\u538b\u7f29\u7b97\u6cd5\uff0c\u4ee5\u53ca\u5355\u4f8b\uff08single-instance\uff09\u5b58\u50a8\u65b9\u5f0f\uff0c\u5927\u5927\u63d0\u9ad8\u4e86\u5b58\u50a8\u6c60\u7684\u5229\u7528\u7387\uff0c\u8282\u7701\u4e86\u7cfb\u7edf\u5f00\u652f\u3002<\/p>\n<p>\u5b98\u65b9\u6587\u6863\u5730\u5740\uff1a <a href=\"https:\/\/backuppc.github.io\/backuppc\/BackupPC.html\">https:\/\/backuppc.github.io\/backuppc\/BackupPC.html<\/a><\/p>\n<p><b>1<\/b><b>\u3001\u57fa\u7840\u73af\u5883\u51c6\u5907\uff1a<\/b><\/p>\n<p>\u64cd\u4f5c\u7cfb\u7edf\uff1aredhat 7 \u5efa\u8bae7\u4ee5\u4e0a<\/p>\n<p>\u8f6f\u4ef6\u7248\u672c\uff1aBackuppc \u7248\u672c\u53f7 3.3.1<\/p>\n<p>http\u7248\u672c\uff1aapache 2.4<\/p>\n<p>\u5b89\u88c5elpe\u6269\u5c55yum\u6e90<\/p>\n<p>\u5173\u95ed\u9632\u706b\u5899<\/p>\n<p>Systemctl stop firewalld<\/p>\n<p>setenforce 0<\/p>\n<p>vi \/etc\/selinux\/config<\/p>\n<p>SELINUX=disabled<\/p>\n<p><b>2<\/b><b>\u3001\u5b89\u88c5\uff1a<\/b><\/p>\n<p><b>yum install <\/b><b>httpd<\/b><b> -y<\/b><\/p>\n<p><b>yum install backuppc -y<\/b><\/p>\n<p><b>3<\/b><b>\u3001\u8f6f\u4ef6\u914d\u7f6e<\/b><\/p>\n<p>\uff08\u4fee\u6539apache\u542f\u52a8\u7528\u6237\u4e3abackuppc\uff09<\/p>\n<p>[root@localhost ~]# vi \/etc\/httpd\/conf\/httpd.conf<\/p>\n<p><b>User backuppc<\/b><\/p>\n<p><b>Group backuppc<\/b><\/p>\n<p>\uff08\u4fee\u6539\u6240\u6709\u4e3b\u673a\u5747\u53ef\u8bbf\u95eebackuppc\u63a7\u5236\u9875\u9762\uff09<\/p>\n<p>[root@localhost ~]# <b>vi \/etc\/httpd\/conf.d\/BackupPC.conf<\/b><\/p>\n<p>&lt;IfModule mod_authz_core.c&gt;<\/p>\n<p># Apache 2.4<\/p>\n<p>&lt;RequireAll&gt;<\/p>\n<p>Require valid-user<\/p>\n<p>&lt;RequireAny&gt;<\/p>\n<p><b>\u00a0\u00a0\u00a0\u00a0\u00a0 Require all granted<\/b><\/p>\n<p>&lt;\/RequireAny&gt;<\/p>\n<p>&lt;\/RequireAll&gt;<\/p>\n<p>&lt;\/IfModule&gt;<\/p>\n<p>\u914d\u7f6eweb\u767b\u9646\u8d26\u6237\u5bc6\u7801<\/p>\n<p>[root@localhost ~]# <b>htpasswd -c \/etc\/BackupPC\/apache.users backuppc<\/b><\/p>\n<p>\uff08\u8fd9\u91cc\u5bc6\u7801\u8bbe\u7f6e\u4e3a123456<\/p>\n<p>\u914d\u7f6ebackupc\u4e3b\u914d\u7f6e\u6587\u4ef6\uff09<\/p>\n<p>[root@localhost ~]#<b> vi \/etc\/BackupPC\/config.pl<\/b><\/p>\n<p>$Conf{CgiAdminUsers}\u00a0\u00a0\u00a0\u00a0 = &#8216;backuppc&#8217;;\uff08\u914d\u7f6ebackuppc\u8d26\u53f7\u4e3abckuppc\uff09<\/p>\n<p>$Conf{ServerInitdPath} = &#8216;\/etc\/init.d\/backppc&#8217;;\uff08\u542f\u52a8\u547d\u4ee4\uff09<\/p>\n<p>$Conf{ServerInitdStartCmd} = &#8216;$sshPath -q -x -l root $serverHost$serverInitdPath start&#8217;;<\/p>\n<p>$Conf{PingPath} = &#8216;\/bin\/ping&#8217;;<\/p>\n<p>$Conf{Language} = &#8216;zh_CN&#8217;;\uff08\u66f4\u6539web\u9875\u9762\u4e3a\u4e2d\u6587\uff09<\/p>\n<p>\u542f\u52a8<\/p>\n<p>[root@localhost ~]# <b>systemctl restart httpd<\/b><\/p>\n<p>[root@localhost ~]# <b>systemctl restart backuppc<\/b><\/p>\n<p><b>4<\/b><b>\u3001\u767b\u9646\u6d4b\u8bd5<\/b><\/p>\n<p><a href=\"http:\/\/xx.xx.xx.xx\/backuppc\">http:\/\/xx.xx.xx.xx\/backuppc<\/a><\/p>\n<p>\u521d\u59cb\u8d26\u6237\uff1abackuppc<\/p>\n<p>\u521d\u59cb\u5bc6\u7801\uff1a123456<\/p>\n<p><b>5<\/b><b>\u3001\u8bbe\u7f6e<\/b><b>linux<\/b><b>\u4e0b\u7684\u514d\u5bc6\u767b\u9646\u8bbe\u7f6e\uff0c<\/b><\/p>\n<p><b>backuppc<\/b><b>\u670d\u52a1\u5668\u7aef\u914d\u7f6e\uff1a<\/b><\/p>\n<p>[root@localhost ~]# <b>cd \/var\/lib\/BackupPC\/<\/b><\/p>\n<p>[root@localhost BackupPC]# mkdir .ssh<\/p>\n<p>[root@localhost BackupPC]# chown backuppc.backuppc .ssh<\/p>\n<p>[root@localhost BackupPC]# chmod 700 .ssh<\/p>\n<p>[root@localhost BackupPC]#<b> su -s \/bin\/bash backuppc<\/b><\/p>\n<p>bash-4.2$ ssh-keygen -t rsa<\/p>\n<p>Generating public\/private rsa key pair.<\/p>\n<p>Enter file in which to save the key (\/var\/lib\/BackupPC\/.ssh\/id_rsa):<\/p>\n<p>Enter passphrase (empty for no passphrase):<\/p>\n<p>Enter same passphrase again:<\/p>\n<p>Your identification has been saved in \/var\/lib\/BackupPC\/.ssh\/id_rsa.<\/p>\n<p>Your public key has been saved in \/var\/lib\/BackupPC\/.ssh\/id_rsa.pub.<\/p>\n<p>The key fingerprint is:<\/p>\n<p>SHA256:1dWLzmcZ22P8oz4oXHvCd145490rY0JVUoCuoR8vp6A backuppc@localhost.localdomain<\/p>\n<p>The key&#8217;s randomart image is:<\/p>\n<p>+&#8212;[RSA 2048]&#8212;-+<\/p>\n<p>|\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ..+o |<\/p>\n<p>|\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 o o ..|<\/p>\n<p>|\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 o . + .|<\/p>\n<p>|\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 o . o o |<\/p>\n<p>|\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 S o + . =|<\/p>\n<p>|\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 . o o o Oo|<\/p>\n<p>|\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 .o * o +++|<\/p>\n<p>|\u00a0\u00a0\u00a0\u00a0\u00a0 . .= O B.oB|<\/p>\n<p>|\u00a0\u00a0\u00a0\u00a0 E\u00a0\u00a0 .= BoB+=|<\/p>\n<p>+&#8212;-[SHA256]&#8212;&#8211;+<\/p>\n<p>bash-4.2$ <b>ssh-copy-id root@192.168.3.12<\/b><\/p>\n<p><b>\u5ba2\u6237\u7aef\uff1a<\/b><\/p>\n<p><b>\u00a0yum -y install rsync<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6f\u4ef6\u4ecb\u7ecd BackupPC\u662f\u4e00\u6b3eLinux\u5e73\u53f0\u4e0b\u7684\u4e00\u6b3e\u975e\u5e38\u7075\u6d3b\u7684\u5f00\u6e90\u7cfb\u7edf\u7cfb\u7edf\u5907\u4efd\u5de5\u5177\uff0c\u8be5\u5de5\u5177\u662f\u4e00\u79cdD2D\u7684\u5907\u4efd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":568,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94],"tags":[112,111],"class_list":["post-567","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-94","tag-backuppc","tag-111"],"_links":{"self":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=567"}],"version-history":[{"count":1,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/567\/revisions"}],"predecessor-version":[{"id":569,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/567\/revisions\/569"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/media\/568"}],"wp:attachment":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}