{"id":1694,"date":"2020-09-25T17:05:50","date_gmt":"2020-09-25T09:05:50","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=1694"},"modified":"2021-10-29T15:31:01","modified_gmt":"2021-10-29T07:31:01","slug":"gbase-8a%e5%8d%87%e7%ba%a7%e8%bf%87%e7%a8%8b%e6%84%8f%e5%a4%96%e5%a4%b1%e8%b4%a5%e5%90%8e%e5%bc%ba%e5%88%b6%e5%9b%9e%e9%80%80%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/1694","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a\u5347\u7ea7\u8fc7\u7a0b\u610f\u5916\u5931\u8d25\u540e\u5f3a\u5236\u56de\u9000\u7684\u65b9\u6cd5Restore.py"},"content":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecd\uff0c\u5728GBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\u5347\u7ea7\u65f6\uff0c\u7531\u4e8e\u610f\u5916\u539f\u56e0\uff0c\u6bd4\u5982\u65ad\u7535\uff0c\u6b7b\u673a\u7b49\uff0c\u5bfc\u81f4\u6570\u636e\u5e93\u5df2\u7ecf\u66f4\u65b0\u4e86\u90e8\u5206\u5185\u5bb9\uff0c\u4f46\u65e0\u6cd5\u6b63\u5e38\u5b8c\u6210\u65f6\uff0c\u5f3a\u884cRestore\u7684\u65b9\u6cd5\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2afd74b007d\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2afd74b007d\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/1694\/#%E7%8E%AF%E5%A2%83\" >\u73af\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/1694\/#%E5%8D%87%E7%BA%A7%E5%A4%B1%E8%B4%A5\" >\u5347\u7ea7\u5931\u8d25<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/1694\/#%E6%B8%85%E7%90%86%E5%8D%87%E7%BA%A7%E6%AE%8B%E7%95%99\" >\u6e05\u7406\u5347\u7ea7\u6b8b\u7559<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/1694\/#%E6%9F%A5%E7%9C%8B%E5%A4%87%E4%BB%BD%E4%BF%A1%E6%81%AF\" >\u67e5\u770b\u5907\u4efd\u4fe1\u606f<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E7%8E%AF%E5%A2%83\"><\/span>\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4e09\u8282\u70b9\u73af\u5883\uff0cV95\u7248\u672c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;gbase@localhost gcinstall]$ gcadmin\nCLUSTER STATE:         ACTIVE\nVIRTUAL CLUSTER MODE:  NORMAL\n\n=============================================================\n|           GBASE COORDINATOR CLUSTER INFORMATION           |\n=============================================================\n|   NodeName   | IpAddress  | gcware | gcluster | DataState |\n-------------------------------------------------------------\n| coordinator1 | 10.0.2.102 | CLOSE  |  CLOSE   |     0     |\n-------------------------------------------------------------\n| coordinator2 | 10.0.2.202 |  OPEN  |  CLOSE   |     0     |\n-------------------------------------------------------------\n| coordinator3 | 10.0.2.203 | CLOSE  |  CLOSE   |     0     |\n-------------------------------------------------------------\n=========================================================================================================\n|                                    GBASE DATA CLUSTER INFORMATION                                     |\n=========================================================================================================\n| NodeName |                IpAddress                 | DistributionId | gnode | syncserver | DataState |\n---------------------------------------------------------------------------------------------------------\n|  node1   |                10.0.2.102                |       6        | CLOSE |   CLOSE    |     0     |\n---------------------------------------------------------------------------------------------------------\n|  node2   |                10.0.2.202                |       6        | CLOSE |   CLOSE    |     0     |\n---------------------------------------------------------------------------------------------------------\n|  node3   |                10.0.2.203                |       6        | CLOSE |   CLOSE    |     0     |\n---------------------------------------------------------------------------------------------------------\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8D%87%E7%BA%A7%E5%A4%B1%E8%B4%A5\"><\/span>\u5347\u7ea7\u5931\u8d25<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5931\u8d25\u5361\u4f4f\u4e86\uff0c\u540e\u53f0kill\u6389\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>10.0.2.202              install cluster on host 10.0.2.202 successfully.\n10.0.2.102              install cluster on host 10.0.2.102 successfully.\nStarting all gcluster nodes...\n^&#91;&#91;B^C^C^C^C^C^C^C^C^C^C^C^C^C^C^CKilled\n&#91;gbase@localhost gcinstall]$\n\n\u53e6\u5f00\u4e00\u4e2a\u7ec8\u7aef\n&#91;gbase@localhost gcinstall]$\n&#91;gbase@localhost ~]$ ps -ef|grep gcin\ngbase    17087 15973  0 02:08 pts\/1    00:00:02 python .\/gcinstall.py -U --silent=demo.options\ngbase    17889 17133  0 02:32 pts\/0    00:00:00 grep --color=auto gcin\n&#91;gbase@localhost ~]$ kill -9 17087\n&#91;gbase@localhost ~]$\n&#91;gbase@localhost ~]$\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%B8%85%E7%90%86%E5%8D%87%E7%BA%A7%E6%AE%8B%E7%95%99\"><\/span>\u6e05\u7406\u5347\u7ea7\u6b8b\u7559<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p> \u5347\u7ea7\u4e00\u534a\u65f6\u610f\u5916\u5931\u8d25\uff0c\u90e8\u5206\u8282\u70b9\u53ef\u80fd\u6b8b\u7559\u4e86\u8fd8\u5728\u8fd0\u884c\u4e2d\u7684\u7a0b\u5e8f\uff0c\u907f\u514d\u4ed6\u4eec\u5f71\u54cdrestore\u7a0b\u5e8f\u7684\u8fd0\u884c\u3002\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>gcinstall.py \u5b89\u88c5\u5347\u7ea7\u53d1\u8d77\u7a0b\u5e8f<\/li><li>InstallTar.py \u8282\u70b9\u5b89\u88c5\u7a0b\u5e8f<\/li><li>tar XXX \u5907\u4efd\u6253\u5305\u7a0b\u5e8f\uff0c \u7528 tar\u547d\u4ee4<\/li><li>gbase\u670d\u52a1\uff0c \u56de\u9000\u524d\u8981\u5c06\u6570\u636e\u5e93\u670d\u52a1\u505c\u6389\uff0c\u5e76\u786e\u8ba4\u6b63\u5e38\u505c\u6b62 ps -ef|grep gbase \u770b\u4e0d\u5230\u6570\u636e\u5e93\u8fdb\u7a0b<\/li><li>python \u5176\u5b83\u7684py\u7a0b\u5e8f\uff0c\u5982\u679c\u6709\u5b58\u5728\u957f\u65f6\u95f4\u8fd0\u884c\u6ca1\u6709\u81ea\u52a8\u505c\u4e0b\u7684\u3002<\/li><li><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9F%A5%E7%9C%8B%E5%A4%87%E4%BB%BD%E4%BF%A1%E6%81%AF\"><\/span>\u67e5\u770b\u5907\u4efd\u4fe1\u606f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p> \u9009\u62e9\u548c\u5b89\u88c5\u65f6\u95f4\u6700\u63a5\u8fd1\u7684\u5907\u4efd\uff0c\u6bd4\u5982gcluster_backup_9.5.2.17.115980_20200908021544.tar.bz2  \u4e00\u822c\u90fd\u662f\u6700\u65b0\u7684\u90a3\u4e2a\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;gbase@localhost gcinstall]$ ll \/home\/gbase\/\ntotal 391200\ndrwx------ 2 gbase gbase        20 Mar  6  2020 data\n-rw-r--r-- 1 root  root  138437196 Sep  8 00:57 GBase8a_MPP_Cluster-NoLicense-9.5.2.26-redhat7.3-x86_64.tar.bz2__\ndrwxrwxr-x 3 gbase gbase      4096 Sep  8 02:20 gcinstall\n-rw-rw-r-- 1 gbase gbase 131070648 Sep  8 01:14 gcluster_backup_9.5.2.17.115980_20200908011242.tar.bz2\n-rw-rw-r-- 1 gbase gbase 131070631 Sep  8 02:17 gcluster_backup_9.5.2.17.115980_20200908021544.tar.bz2\n&#91;gbase@localhost gcinstall]$ .\/Restore.py --help\nUsage: Restore.py &#91;options]<\/code><\/pre>\n\n\n\n<p>\u5f00\u59cb\u8fd8\u539f<\/p>\n\n\n\n<p>Restore\u547d\u4ee4\u5907\u4efd\u6587\u4ef6\u540d\u5b57\uff0c\u548c\u5347\u7ea7\u7528\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;gbase@localhost gcinstall]$ .\/Restore.py --help\nUsage: Restore.py &#91;options]\n\nOptions:\n  -h, --help            show this help message and exit\n  -a                    do not prompt the user for confirmation\n  --backupFile=BACKUPFILE\n                        backup package\n  --silent=SILENTCONFIG\n                        use the supplied properties file for a 'silent'\n                        restore\n  --passwordInputMode=PASSWORDINPUTMODE\n                        get password method&#91;file,pwdsame,pwddiff],\n                        file:  get from config file,default\n                        pwdsame: nodes have the same user passwd\n                        pwddiff: nodes have different user passwds\n&#91;gbase@localhost gcinstall]$ .\/Restore.py --backupFile=\/home\/gbase\/gcluster_backup_9.5.2.17.115980_20200908021544.tar.bz2 --silent=demo.options\nCoordinateHost:\n10.0.2.102    10.0.2.202    10.0.2.203\nDataHost:\n10.0.2.102    10.0.2.202    10.0.2.203\nAre you sure to restore these gcluster nodes from \/home\/gbase\/gcluster_backup_9.5.2.17.115980_20200908021544.tar.bz2 (&#91;Y,y]\/&#91;N,n])? y\n10.0.2.203      Success to RestoreLocal.\n10.0.2.202      Success to RestoreLocal.\n10.0.2.102      Success to RestoreLocal.\n&#91;gbase@localhost gcinstall]$<\/code><\/pre>\n\n\n\n<p>\u5b8c\u6210<\/p>","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecd\uff0c\u5728GBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\u5347\u7ea7\u65f6\uff0c\u7531\u4e8e\u610f\u5916\u539f\u56e0\uff0c\u6bd4\u5982\u65ad\u7535\uff0c\u6b7b\u673a\u7b49\uff0c\u5bfc\u81f4\u6570\u636e\u5e93\u5df2\u7ecf\u66f4\u65b0\u4e86\u90e8\u5206\u5185\u5bb9\uff0c\u4f46\u65e0\u6cd5\u6b63\u5e38\u5b8c\u6210\u65f6\uff0c\u5f3a\u884cRestore\u7684\u65b9\u6cd5\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[93],"class_list":["post-1694","post","type-post","status-publish","format-standard","hentry","category-gbase8a","tag-93"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=1694"}],"version-history":[{"count":5,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1694\/revisions"}],"predecessor-version":[{"id":8307,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1694\/revisions\/8307"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=1694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=1694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=1694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}