{"id":544,"date":"2012-12-27T11:24:58","date_gmt":"2012-12-27T03:24:58","guid":{"rendered":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/?p=544"},"modified":"2013-07-17T21:24:57","modified_gmt":"2013-07-17T13:24:57","slug":"%e3%80%90%e8%99%9b%e6%93%ac%e5%8c%96%e7%ad%86%e8%a8%98%e3%80%91esxi%e5%ae%89%e8%a3%9dghettovcb-sh%e6%8e%92%e7%a8%8b%e5%82%99%e4%bb%bd%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85","status":"publish","type":"post","link":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/?p=544","title":{"rendered":"\u3010\u865b\u64ec\u5316\u7b46\u8a18\u3011ESXi\u5b89\u88ddghettoVCB.sh\u6392\u7a0b\u5099\u4efd\u6ce8\u610f\u4e8b\u9805"},"content":{"rendered":"<p>\u60f3\u6e2c\u8a66iSCSI\u5099\u4efd\u6548\u80fd\uff0c\u56e0\u6b64\u5617\u8a66\u5c07ghettoVCB.sh\u5b89\u88dd\u81f3ESXi\u4e2d\u6392\u7a0b\u5099\u4efd\uff0c\u9084\u771f\u4e0d\u662f\u666e\u901a\u7684\u9ebb\u7169~<br \/>\n\u76f8\u95dc\u5b89\u88dd\u8a2d\u5b9a\u6587\u7ae0\u53ef\u4ee5\u53c3\u8003VMware\u793e\u7fa4<a title=\"ghettoVCB.sh - Free alternative for backing up VM's for ESX(i) 3.5, 4.x+ &amp; 5.x\" href=\"http:\/\/communities.vmware.com\/docs\/DOC-8760\" target=\"_blank\">\u9019\u7bc7\u6587\u7ae0<\/a>\uff0c\u4e5f\u53ef\u4ee5\u53c3\u8003\u58eb\u6797\u570b\u5c0f\u67ef\u8001\u5e2b\u7684<a title=\"ESXi 5 \u4e0b ghettoVCB.sh \u5b89\u88dd\u53ca\u64cd\u4f5c\u904e\u7a0b\" href=\"http:\/\/blog.slps.tp.edu.tw\/00086\/?p=366\" target=\"_blank\">\u9019\u7bc7\u6587\u7ae0<\/a>\u3002<\/p>\n<p><strong>\u4e0b\u9762\u662f\u81ea\u5df1\u5b89\u88dd<span style=\"color: #333333; font-style: normal; line-height: 24px;\">\u6392\u7a0b<\/span>\u6642\u9047\u5230\u7684\u6ce8\u610f\u4e8b\u9805\uff0c\u7b46\u8a18\u4e0b\u4f86\uff0c\u65b9\u4fbf\u65e5\u5f8c\u67e5\u95b1<\/strong>\uff1a<\/p>\n<p><!--more--><br \/>\n1.\u5b98\u7db2\u6709\u63d0\u5230\uff0c\u6392\u7a0b\u8a2d\u5b9a(crontabs)\u8981\u5c0e\u5411log\u6216\u7a7a\u503c\uff0c\u4ee5\u907f\u514dbuffer\u4e0d\u5920\u5c0e\u81f4ghettoVCB\u505c\u6b62\u904b\u4f5c\u3002<br \/>\n\u4f8b\u5982\uff1a<\/p>\n<pre><code>0 0 * * 1-5 \/vmfs\/volumes\/dlgCore-NFS-bigboi.VM-Backups\/ghettoVCB.sh -f \/vmfs\/volumes\/dlgCore-NFS-bigboi.VM-Backups\/backuplist <span style=\"color: #ff0000;\">&gt; ghettoVCB-backup-$(date +\\%s).log<\/span><\/code><\/pre>\n<pre>0 0 * * 1-5 \/vmfs\/volumes\/dlgCore-NFS-bigboi.VM-Backups\/ghettoVCB.sh -f \/vmfs\/volumes\/dlgCore-NFS-bigboi.VM-Backups\/backuplist <span style=\"color: #ff0000;\">&gt; \/dev\/null<\/span><\/pre>\n<p>2.\u56e0\u70baESXi\u5167\u5b9a\u6642\u5340\u70baUTC \u6642\u5340\uff0c\u4e14\u6839\u64da<a title=\"Adjusting ESX host Time Zone\" href=\"http:\/\/kb.vmware.com\/selfservice\/microsites\/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1436\" target=\"_blank\">\u5b98\u65b9KB1436<\/a>\u662f\u7121\u6cd5\u4fee\u6539\u7684\uff0c\u6240\u4ee5cron\u6642\u9593\u8981\u8a2d\u6210\u63d0\u65e98\u5c0f\u6642\uff0c\u624d\u662f\u53f0\u5317\u6642\u9593\uff0c\u4f8b\u5982\uff1a\u8981\u4e0b\u53489\u9ede(21pm)\u5099\u4efd\uff0chour\u8981\u5beb\u621013\u3002<\/p>\n<p>3.\u6392\u7a0b\u5099\u4efd\u6e05\u55ae\u96fb\u8166\u540d\u7a31\u8981\u6ce8\u610f\uff1a<br \/>\nVM\u4e0d\u8981\u6709\u62ec\u865f\u6216\u7279\u6b8a\u7b26\u865f\uff0c\u5426\u5247\u5099\u4efd\u6703\u5931\u6557\u3002VM\u540d\u7a31\u4e4b\u9593\u65b7\u884c\u8981\u4e7e\u6de8\uff0c\u4e0d\u8981\u6709spacec\u6216tab\u7a7a\u683c\uff0cWindows\u4e0a\u6700\u597d\u4f7f\u7528WinSCP\u4fee\u6539\u6bd4\u8f03\u4e0d\u6703\u6709\u554f\u984c\u3002<br \/>\n<a href=\"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/wp-content\/uploads\/2012\/12\/1.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-563\" title=\"vm-list\" alt=\"\" src=\"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/wp-content\/uploads\/2012\/12\/1.png\" width=\"412\" height=\"126\" srcset=\"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/wp-content\/uploads\/2012\/12\/1.png 412w, http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/wp-content\/uploads\/2012\/12\/1-300x91.png 300w\" sizes=\"(max-width: 412px) 100vw, 412px\" \/><\/a><\/p>\n<p>4.\u8a2d\u5b9a\u5f8c\uff0c\u8981\u5148\u522a\u9664\u76ee\u524d\u7684\u6392\u7a0b\u4e26\u91cd\u65b0\u8b80\u53d6\uff0cESXi4.X\u4ee5\u4e0a\u6307\u4ee4\u70ba\uff1a<\/p>\n<pre><code>~ # kill $(cat \/var\/run\/crond.pid) ~ # busybox crond<\/code><\/pre>\n<p>5.\u78ba\u4fdd\u6392\u7a0b\u5728ESXi\u91cd\u65b0\u555f\u52d5\u5f8c\u4ecd\u7e7c\u7e8c\u904b\u4f5c\uff0c\u8981\u5728<strong>\/etc\/rc.local\u52a0\u51653\u884c\u7d05\u6846\u90e8\u5206\uff1a<br \/>\n<a href=\"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/wp-content\/uploads\/2012\/12\/2.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-574\" title=\"3line\" alt=\"\" src=\"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/wp-content\/uploads\/2012\/12\/2.png\" width=\"625\" height=\"405\" srcset=\"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/wp-content\/uploads\/2012\/12\/2.png 625w, http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/wp-content\/uploads\/2012\/12\/2-300x194.png 300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a>\u00a0<\/strong><\/p>\n<p><strong>\u00a0PS:\u4e09\u884c\u8981\u548ccronjob\u4e2d\u7684\u4e00\u6a23<\/strong><\/p>\n<p>\u70ba\u4e86\u5132\u5b58\u8a2d\u5b9a\uff0c\u9700\u8981\u91cd\u555fESXi\u7684\u5099\u4efdscript\uff1a<\/p>\n<pre><code>~ # \/sbin\/auto-backup.sh<\/code><\/pre>\n<p>6.\u5168\u90e8\u8a2d\u5b9a\u5b8c\u5efa\u8b70\u6700\u597d\u91cd\u65b0\u555f\u52d5ESXi\uff0c\u56e0\u70ba\u6211\u5c31\u9047\u5230\u540c\u6642\u67092\u500b\u76f8\u540c\u6392\u7a0b\u5728\u8dd1\uff0c\u7b2c\u4e00\u500b\u6392\u7a0b\u5099\u4efdOK\uff0c\u5dee\u4e0d\u5230\u5e7e\u79d2\u7684\u7b2c2\u500b\u6392\u7a0b\u537b\u986f\u793a\u5931\u6557\uff0c\u4f46\u5099\u4efd\u6a94\u52a0\u5165\u5f8c\u53ef\u4ee5\u6b63\u5e38\u904b\u4f5c\uff0c\u5f8c\u4f86reboot ESXi\u5f8c\u6b63\u5e38\u4e86~(\u53ef\u80fd\u662f\u6211\u54ea\u88e1miss\u6389\u4e86~^_^)\u3002<\/p>\n<p>7.\u5982\u679cLog\u986f\u793a\u627e\u4e0d\u5230VM\u6216\u88ab\u9396\u5b9a\uff0c\u53ef\u4ee5\u5230\/tmp \u4e0b\u522a\u9664ghettoVCB.lock\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u60f3\u6e2c\u8a66iSCSI\u5099\u4efd\u6548\u80fd\uff0c\u56e0\u6b64\u5617\u8a66\u5c07ghettoVCB.sh\u5b89\u88dd\u81f3ESXi\u4e2d\u6392\u7a0b\u5099\u4efd\uff0c\u9084\u771f\u4e0d\u662f\u666e\u901a\u7684\u9ebb\u7169~ \u76f8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_links_to":"","_links_to_target":""},"categories":[8],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=\/wp\/v2\/posts\/544"}],"collection":[{"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=544"}],"version-history":[{"count":34,"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=\/wp\/v2\/posts\/544\/revisions"}],"predecessor-version":[{"id":789,"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=\/wp\/v2\/posts\/544\/revisions\/789"}],"wp:attachment":[{"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=544"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.fhps.tp.edu.tw\/fhpsmis\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}