[{"data":1,"prerenderedAt":560},["ShallowReactive",2],{"blog-\u002Fen\u002Fblog\u002Fghettovcb-sauvegarde-gratuite-vmware-esxi":3,"blog-\u002Fen\u002Fblog\u002Fghettovcb-sauvegarde-gratuite-vmware-esxi-surround":503,"blog-\u002Fen\u002Fblog\u002Fghettovcb-sauvegarde-gratuite-vmware-esxi-certifications":559},{"id":4,"title":5,"body":6,"categories":491,"cover":492,"cover_contain":493,"credly_badge_id":491,"date":494,"description":495,"extension":496,"meta":497,"navigation":493,"path":498,"related_certifications":491,"seo":499,"slug":500,"stem":501,"__hash__":502},"blog\u002Fen\u002Fblog\u002Fghettovcb-sauvegarde-gratuite-vmware-esxi.md","GhettoVCB, the Free Backup Solution for VMware ESXi",{"type":7,"value":8,"toc":485},"minimark",[9,14,18,53,57,71,77,81,84,107,110,126,129,141,144,173,176,179,192,195,228,231,280,283,297,300,324,327,338,341,372,375,387,390,402,405,429,432,441,444,458,461,467,474,478,481],[10,11,13],"h2",{"id":12},"real-world-use-case","Real-world use case",[15,16,17],"p",{},"You need to back up an ESXi VM without powering it off or paying for a license: discover GhettoVCB, the free solution.",[15,19,20,24,25,28,29,32,33,36,37,40,41,43,44,50,52],{},[21,22,23],"strong",{},"The free version of VMware ESXi"," doesn't offer ",[21,26,27],{},"hot backup of virtual machines",".",[30,31],"br",{},"\nA script developed by ",[21,34,35],{},"Virtuallyghetto",", called ",[21,38,39],{},"GhettoVCB",", lets you get around this problem!",[30,42],{},"\nGhettoVCB's GitHub page is available at this address: ",[45,46,39],"a",{"href":47,"rel":48},"https:\u002F\u002Fgithub.com\u002Flamw\u002FghettoVCB",[49],"nofollow",[30,51],{},"\nIn this article, we'll stick to the essentials.",[10,54,56],{"id":55},"preparing-ghettovcb","Preparing ghettoVCB",[15,58,59,60,28,65,67,68,70],{},"Download all the files by clicking ",[45,61,64],{"href":62,"rel":63},"https:\u002F\u002Fgithub.com\u002Flamw\u002FghettoVCB\u002Farchive\u002Fmaster.zip",[49],"Download ZIP",[30,66],{},"\nThen go to your hypervisor to transfer ghettoVCB-master.zip.",[30,69],{},"\nNow, connect to your hypervisor via SSH.",[15,72,73,74,76],{},"Our working directory will be: \u002Fvmfs\u002Fvolumes\u002Fdatastore1\u002FghettoVCB.",[30,75],{},"\nIt's strongly recommended to put it on a local datastore and copy it into a folder.",[10,78,80],{"id":79},"ghettovcb-in-the-esxi-5-hypervisor","ghettoVCB in the ESXi 5 hypervisor",[15,82,83],{},"Unzip your zip file:",[85,86,91],"pre",{"className":87,"code":88,"language":89,"meta":90,"style":90},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","unzip ghettoVCB-master.zip\n","bash","",[92,93,94],"code",{"__ignoreMap":90},[95,96,99,103],"span",{"class":97,"line":98},"line",1,[95,100,102],{"class":101},"sBMFI","unzip",[95,104,106],{"class":105},"sfazB"," ghettoVCB-master.zip\n",[15,108,109],{},"Make your script executable:",[85,111,113],{"className":87,"code":112,"language":89,"meta":90,"style":90},"chmod +x ghettoVCB.sh\n",[92,114,115],{"__ignoreMap":90},[95,116,117,120,123],{"class":97,"line":98},[95,118,119],{"class":101},"chmod",[95,121,122],{"class":105}," +x",[95,124,125],{"class":105}," ghettoVCB.sh\n",[15,127,128],{},"Edit your ghettoVCB.sh file:",[85,130,132],{"className":87,"code":131,"language":89,"meta":90,"style":90},"vi ghettoVCB.sh\n",[92,133,134],{"__ignoreMap":90},[95,135,136,139],{"class":97,"line":98},[95,137,138],{"class":101},"vi",[95,140,125],{"class":105},[15,142,143],{},"Edit the following variables:",[85,145,147],{"className":87,"code":146,"language":89,"meta":90,"style":90},"VM_BACKUP_VOLUME=\u002Fvmfs\u002Fvolumes\u002F52304bd6-af562afc-e5fa-08606ee5bd47\u002Fbackups\nVM_BACKUP_ROTATION_COUNT=2\n",[92,148,149,162],{"__ignoreMap":90},[95,150,151,155,159],{"class":97,"line":98},[95,152,154],{"class":153},"sTEyZ","VM_BACKUP_VOLUME",[95,156,158],{"class":157},"sMK4o","=",[95,160,161],{"class":105},"\u002Fvmfs\u002Fvolumes\u002F52304bd6-af562afc-e5fa-08606ee5bd47\u002Fbackups\n",[95,163,165,168,170],{"class":97,"line":164},2,[95,166,167],{"class":153},"VM_BACKUP_ROTATION_COUNT",[95,169,158],{"class":157},[95,171,172],{"class":105},"2\n",[15,174,175],{},"\"52304bd6-af562afc-e5fa-08606ee5bd47\" corresponds to my datastore 2.",[15,177,178],{},"Create a listvm file:",[85,180,182],{"className":87,"code":181,"language":89,"meta":90,"style":90},"touch listvm\n",[92,183,184],{"__ignoreMap":90},[95,185,186,189],{"class":97,"line":98},[95,187,188],{"class":101},"touch",[95,190,191],{"class":105}," listvm\n",[15,193,194],{},"Add the VM names:",[85,196,198],{"className":87,"code":197,"language":89,"meta":90,"style":90},"core.vyatta.master\ncore.vyatta.slave\nsrv.owncloud\nsrv.zimbra\nsrv.zpush\n",[92,199,200,205,210,216,222],{"__ignoreMap":90},[95,201,202],{"class":97,"line":98},[95,203,204],{"class":101},"core.vyatta.master\n",[95,206,207],{"class":97,"line":164},[95,208,209],{"class":101},"core.vyatta.slave\n",[95,211,213],{"class":97,"line":212},3,[95,214,215],{"class":101},"srv.owncloud\n",[95,217,219],{"class":97,"line":218},4,[95,220,221],{"class":101},"srv.zimbra\n",[95,223,225],{"class":97,"line":224},5,[95,226,227],{"class":101},"srv.zpush\n",[15,229,230],{},"Look for the \"crond\" process:",[85,232,234],{"className":87,"code":233,"language":89,"meta":90,"style":90},"ps | grep crond | grep -v grep\n==> 3255 23255 crond                crond\n",[92,235,236,260],{"__ignoreMap":90},[95,237,238,241,244,247,250,252,254,257],{"class":97,"line":98},[95,239,240],{"class":101},"ps",[95,242,243],{"class":157}," |",[95,245,246],{"class":101}," grep",[95,248,249],{"class":105}," crond",[95,251,243],{"class":157},[95,253,246],{"class":101},[95,255,256],{"class":105}," -v",[95,258,259],{"class":105}," grep\n",[95,261,262,265,268,272,275,277],{"class":97,"line":164},[95,263,264],{"class":105},"==",[95,266,267],{"class":153},"> ",[95,269,271],{"class":270},"sbssI","3255",[95,273,274],{"class":270}," 23255",[95,276,249],{"class":105},[95,278,279],{"class":105},"                crond\n",[15,281,282],{},"Kill the cron process:",[85,284,286],{"className":87,"code":285,"language":89,"meta":90,"style":90},"kill 3255\n",[92,287,288],{"__ignoreMap":90},[95,289,290,294],{"class":97,"line":98},[95,291,293],{"class":292},"s2Zo4","kill",[95,295,296],{"class":270}," 3255\n",[15,298,299],{},"Update the cron permissions:",[85,301,303],{"className":87,"code":302,"language":89,"meta":90,"style":90},"chmod 644 \u002Fvar\u002Fspool\u002Fcron\u002Fcrontabs\u002Froot\nchmod +t \u002Fvar\u002Fspool\u002Fcron\u002Fcrontabs\u002Froot\n",[92,304,305,315],{"__ignoreMap":90},[95,306,307,309,312],{"class":97,"line":98},[95,308,119],{"class":101},[95,310,311],{"class":270}," 644",[95,313,314],{"class":105}," \u002Fvar\u002Fspool\u002Fcron\u002Fcrontabs\u002Froot\n",[95,316,317,319,322],{"class":97,"line":164},[95,318,119],{"class":101},[95,320,321],{"class":105}," +t",[95,323,314],{"class":105},[15,325,326],{},"Schedule the cron job:",[85,328,330],{"className":87,"code":329,"language":89,"meta":90,"style":90},"vi \u002Fvar\u002Fspool\u002Fcron\u002Fcrontabs\u002Froot\n",[92,331,332],{"__ignoreMap":90},[95,333,334,336],{"class":97,"line":98},[95,335,138],{"class":101},[95,337,314],{"class":105},[15,339,340],{},"Add this line to the cron:",[85,342,344],{"className":87,"code":343,"language":89,"meta":90,"style":90},"0    0    *   *   1   \u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002FghettoVCB.sh -f \u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002Flistvm\n",[92,345,346],{"__ignoreMap":90},[95,347,348,351,354,357,360,363,366,369],{"class":97,"line":98},[95,349,350],{"class":101},"0",[95,352,353],{"class":270},"    0",[95,355,356],{"class":153},"    *",[95,358,359],{"class":153},"   *",[95,361,362],{"class":270},"   1",[95,364,365],{"class":105},"   \u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002FghettoVCB.sh",[95,367,368],{"class":105}," -f",[95,370,371],{"class":105}," \u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002Flistvm\n",[15,373,374],{},"Go to the rc.local file:",[85,376,378],{"className":87,"code":377,"language":89,"meta":90,"style":90},"vi \u002Fetc\u002Frc.local\n",[92,379,380],{"__ignoreMap":90},[95,381,382,384],{"class":97,"line":98},[95,383,138],{"class":101},[95,385,386],{"class":105}," \u002Fetc\u002Frc.local\n",[15,388,389],{},"For version 5.1:",[85,391,393],{"className":87,"code":392,"language":89,"meta":90,"style":90},"vi \u002Fetc\u002Frc.local.d\u002Flocal.sh\n",[92,394,395],{"__ignoreMap":90},[95,396,397,399],{"class":97,"line":98},[95,398,138],{"class":101},[95,400,401],{"class":105}," \u002Fetc\u002Frc.local.d\u002Flocal.sh\n",[15,403,404],{},"Add this:",[85,406,408],{"className":87,"code":407,"language":89,"meta":90,"style":90},"\u002Fbin\u002Fecho \"0    0    *   *   1   \u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002FghettoVCB.sh -f \u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002Flistvm\" >> \u002Fvar\u002Fspool\u002Fcron\u002Fcrontabs\u002Froot\n",[92,409,410],{"__ignoreMap":90},[95,411,412,415,418,421,424,427],{"class":97,"line":98},[95,413,414],{"class":101},"\u002Fbin\u002Fecho",[95,416,417],{"class":157}," \"",[95,419,420],{"class":105},"0    0    *   *   1   \u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002FghettoVCB.sh -f \u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002Flistvm",[95,422,423],{"class":157},"\"",[95,425,426],{"class":157}," >>",[95,428,314],{"class":105},[15,430,431],{},"Restart cron:",[85,433,435],{"className":87,"code":434,"language":89,"meta":90,"style":90},"crond\n",[92,436,437],{"__ignoreMap":90},[95,438,439],{"class":97,"line":98},[95,440,434],{"class":101},[15,442,443],{},"To test the script works correctly:",[85,445,447],{"className":87,"code":446,"language":89,"meta":90,"style":90},"\u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002FghettoVCB.sh -f \u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002Flistvm\n",[92,448,449],{"__ignoreMap":90},[95,450,451,454,456],{"class":97,"line":98},[95,452,453],{"class":101},"\u002Fvmfs\u002Fvolumes\u002F5230458e-84f00e58-8db6-08606ee5bd47\u002FghettoVCB\u002FghettoVCB.sh",[95,455,368],{"class":105},[95,457,371],{"class":105},[15,459,460],{},"Check my datastore2:",[15,462,463],{},[464,465],"img",{"alt":90,"src":466},"\u002Fimages\u002Fblog\u002Fghettovcb-sauvegarde-gratuite-vmware-esxi\u002F14d8257859.png",[15,468,469,470,28],{},"For more details on the commands: ",[45,471,39],{"href":472,"rel":473},"https:\u002F\u002Fcommunities.vmware.com\u002Fdocs\u002FDOC-8760",[49],[10,475,477],{"id":476},"conclusion","Conclusion",[15,479,480],{},"I detailed here how to set up GhettoVCB to work around the lack of hot backup for virtual machines in the free version of VMware ESXi. Configuring the script, from the list of VMs to back up to scheduling via cron and automatic startup when the hypervisor boots, provides a simple, free backup solution. It's a valuable alternative for ESXi environments that don't have a license enabling native backups.",[482,483,484],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":90,"searchDepth":164,"depth":164,"links":486},[487,488,489,490],{"id":12,"depth":164,"text":13},{"id":55,"depth":164,"text":56},{"id":79,"depth":164,"text":80},{"id":476,"depth":164,"text":477},null,"\u002Fimages\u002Fblog\u002Fghettovcb-sauvegarde-gratuite-vmware-esxi\u002Fd8c6089e77.png",true,"2013-10-08","Can't back up a VM without powering it off? GhettoVCB is the essential solution! It performs hot backups of your ESXi VMs.","md",{},"\u002Fen\u002Fblog\u002Fghettovcb-sauvegarde-gratuite-vmware-esxi",{"title":5,"description":495},"ghettovcb-sauvegarde-gratuite-vmware-esxi","en\u002Fblog\u002Fghettovcb-sauvegarde-gratuite-vmware-esxi","dt1ZtfAjjzEBuzRhojy_wE2oLPEuTAwVcOyieP7FczU",[504,512,519,526,533,540,546,552],{"title":505,"path":506,"stem":507,"date":508,"cover":509,"categories":510,"children":-1},"iSCSI RPN-SAN with VMware ESXi","\u002Fen\u002Fblog\u002Fblog-iscsi-rpn-san-avec-vmware-esxi","en\u002Fblog\u002Fblog-iscsi-rpn-san-avec-vmware-esxi","2013-10-23","\u002Fimages\u002Fblog\u002Fblog-iscsi-rpn-san-avec-vmware-esxi\u002Fd8c6089e77.png",[511],"Réseau",{"title":513,"path":514,"stem":515,"date":516,"cover":517,"categories":518,"children":-1},"Configuring a Pseudo-Ethernet Interface with Vyatta","\u002Fen\u002Fblog\u002Fconfiguration-une-pseudo-ethernet-interface-avec-vyatta","en\u002Fblog\u002Fconfiguration-une-pseudo-ethernet-interface-avec-vyatta","2013-10-20","\u002Fimages\u002Fblog\u002Fconfiguration-une-pseudo-ethernet-interface-avec-vyatta\u002Fa44b82e35f.jpg",[511],{"title":520,"path":521,"stem":522,"date":523,"cover":524,"categories":525,"children":-1},"Configuring VLANs with Vyatta","\u002Fen\u002Fblog\u002Fconfiguration-vlan-avec-vyatta","en\u002Fblog\u002Fconfiguration-vlan-avec-vyatta","2013-10-17","\u002Fimages\u002Fblog\u002Fconfiguration-vlan-avec-vyatta\u002Fa44b82e35f.jpg",[511],{"title":527,"path":528,"stem":529,"date":530,"cover":531,"categories":532,"children":-1},"Virtual Networking with VMware ESXi 5","\u002Fen\u002Fblog\u002Fblog-mise-reseau-virtuelle-vmware-esxi","en\u002Fblog\u002Fblog-mise-reseau-virtuelle-vmware-esxi","2013-10-10","\u002Fimages\u002Fblog\u002Fblog-mise-reseau-virtuelle-vmware-esxi\u002Fd8c6089e77.png",[511],{"title":534,"path":535,"stem":536,"date":537,"cover":538,"categories":539,"children":-1},"Configuring VPN Remote Access with Vyatta","\u002Fen\u002Fblog\u002Fconfiguration-des-acces-distance-vpn-avec-vyatta","en\u002Fblog\u002Fconfiguration-des-acces-distance-vpn-avec-vyatta","2013-10-03","\u002Fimages\u002Fblog\u002Fconfiguration-des-acces-distance-vpn-avec-vyatta\u002Fa44b82e35f.jpg",[511],{"title":541,"path":542,"stem":543,"date":544,"cover":545,"categories":491,"children":-1},"Arch Linux Distribution: Customization","\u002Fen\u002Fblog\u002Fdistribution-arch-linux-personnalisation","en\u002Fblog\u002Fdistribution-arch-linux-personnalisation","2013-09-25","\u002Fimages\u002Fblog\u002Fdistribution-arch-linux-personnalisation\u002F68a1cb957a.png",{"title":547,"path":548,"stem":549,"date":550,"cover":551,"categories":491,"children":-1},"Arch Linux ARM Distribution: Raspberry Pi","\u002Fen\u002Fblog\u002Fdistribution-arch-linux-arm-raspberry","en\u002Fblog\u002Fdistribution-arch-linux-arm-raspberry","2013-09-22","\u002Fimages\u002Fblog\u002Fdistribution-arch-linux-arm-raspberry\u002Fb426e4efea.png",{"title":553,"path":554,"stem":555,"date":556,"cover":557,"categories":558,"children":-1},"Firewall Zone Configuration with Vyatta","\u002Fen\u002Fblog\u002Fconfiguration-zone-pare-feu-avec-vyatta","en\u002Fblog\u002Fconfiguration-zone-pare-feu-avec-vyatta","2013-09-15","\u002Fimages\u002Fblog\u002Fconfiguration-zone-pare-feu-avec-vyatta\u002Fa44b82e35f.jpg",[511],[],1786644893384]