{"id":133,"date":"2010-04-28T09:46:48","date_gmt":"2010-04-28T09:46:48","guid":{"rendered":"http:\/\/test.bleuanus.nl\/index.php\/esx\/ghettovcb\/"},"modified":"2018-12-11T16:09:08","modified_gmt":"2018-12-11T15:09:08","slug":"ghettovcb","status":"publish","type":"post","link":"https:\/\/www.bleuanus.nl\/index.php\/2010\/04\/28\/ghettovcb\/","title":{"rendered":"ghettoVCB"},"content":{"rendered":"<p class=\"last-modified\">This post was most recently updated on December 11th, 2018<\/p><p>1. First of all, download the <a title=\"ghetto.vcb\" href=\"http:\/\/www.rancidswan.com\/downloads\/ghettoVCB.sh\"><u><font color=\"#0000ff\">ghettoVCB.sh<\/font><\/u><\/a> script, and the example file <a href=\"http:\/\/www.rancidswan.com\/downloads\/vmbackup\"><u><font color=\"#810081\">vmbackup<\/font><\/u><\/a><\/p>\n<p>2. Now, you\u2019ll need to ftp these files to you ESXi host (If you haven\u2019t already enabled ftp access, you can find my guide on how to do it here <a href=\"http:\/\/www.rancidswan.com\/?p=4\"><u><font color=\"#0000ff\">http:\/\/www.rancidswan.com\/?p=4<\/font><\/u><\/a>)<\/p>\n<p>3. Now, ssh to your ESXi host and edit the ghettoVCB.sh file. There are a number of options at the top of the file, but not many, and they should all be fairly self explanatory. Just for testing you can set the path of the backup location to be somewhere on the ESXi host itself. Later I\u2019ll be writing a guide on how to setup an NFS share on a Windows 2003 server so that these snapshot backups can be pushed directly to a windows machine.<\/p>\n<p>4. You\u2019ll also need to edit the file I\u2019ve called vmbackup. This file purely contains just the name of the machine you want to backup (note: it\u2019s the machine\u2019s Virtual Machine name, not it\u2019s Computer name you use, the name has to be understandable by the ESXi host)\u00a0 You can have multiple machine names if you wish, with distinct names on each line, but personally I\u2019d recommend just having one name in the file, this will make it easier to automate individual machine backups later on)<\/p>\n<p>5. OK, now you\u2019ll need to set the permissions on the file ghettoVCB.sh like this:<\/p>\n<p>chmod 777 ghettoVCB.sh<\/p>\n<p>5. Now, to run the script, you simply need to write:<\/p>\n<p>.\/ghettoVCB.sh vmbackups<\/p>\n<p>The script will now run and either show a progress meter, or show you any error messages you might need to tackle!<\/p>\n<p>\u00a0<\/p>\n<p>Implement the script<\/p>\n<p>After logging in via SSH, we need to download GhettoVCB.sh<br \/>~ # mkdir backup<\/p>\n<p>~ # cd backup<\/p>\n<p>\/backup # wget http:\/\/dakeung.com\/wp-content\/uploads\/2009\/09\/GhettoVCB.sh<\/p>\n<p>Connecting to dakeung.com (174.120.63.119:80)<br \/>GhettoVCB.sh 100% |****************************************| 17974 00:00:00 ETA<br \/>\/backup # chmod +x GhettoVCB.sh<\/p>\n<p>* you upload the file from inside \u201cBrowse Storage\u201d in vSphere Client.<\/p>\n<h1>ADD NFS SERVER AS DATASTORE<\/h1>\n<p>We now need to add the NFS server to the vSphere Client.<\/p>\n<div class=\"wp-caption aligncenter\" id=\"attachment_448\" style=\"width: 310px\"><a href=\"https:\/\/dakeung.com\/wp-content\/uploads\/2009\/09\/add_NFS_storage.JPG\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-448\" title=\"add_NFS_storage\" height=\"175\" alt=\"add_NFS_storage\" src=\"https:\/\/dakeung.com\/wp-content\/uploads\/2009\/09\/add_NFS_storage-300x175.jpg\" width=\"300\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">add_NFS_storage<\/p>\n<\/div>\n<h1>CONFIGURING GHETTOVCB.SH<\/h1>\n<p>Back to SSH :<\/p>\n<p>\/backup # ls \/vmfs\/volumes\/<\/p>\n<p>Locate your NFS mount point, remember the path for your NFS server as you will need it in the next step.<\/p>\n<p>\/backup # vi GhettoVCB.sh<\/p>\n<p>Modify :<\/p>\n<p># directory that all VM backups should go (e.g. \/vmfs\/volumes\/SAN_LUN1\/mybackupdir)<\/p>\n<p>VM_BACKUP_VOLUME=\/vmfs\/volumes\/BACKUP-STORAGE<\/p>\n<p>To point to your NFS backup mount.<\/p>\n<p># enable compression with gzip+tar 1=on, 0=off<br \/>ENABLE_COMPRESSION=1<\/p>\n<p>This will compress the images before transferring them, if you want to maintain your files without compression. Change this to =0<\/p>\n<p>Save<\/p>\n<p>Now to list the virtual machines to backup:<\/p>\n<p>\/backup # touch vmserver.list<\/p>\n<p>\/backup # vi vmserver.list<\/p>\n<p>Add the names of your virtual machines here.<\/p>\n<p>Save<\/p>\n<h1>Run Backup:<\/h1>\n<p>\/backup # .\/GhettoVCB.sh vmserver.list<\/p>\n<p>That should start the vm backups.<\/p>\n<h1>Scheduling Backups:<\/h1>\n<p>If you would want to run cronjobs, please check out the following site.<\/p>\n<p><a href=\"http:\/\/communities.vmware.com\/docs\/DOC-8760\" target=\"_self\"><font color=\"#189ad0\">http:\/\/communities.vmware.com\/docs\/DOC-8760<\/font><\/a><\/p>\n<p>Alternately you can run the backups from Windows using <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/download.html\" target=\"_self\" modo=\"false\"><font color=\"#189ad0\">PLINK<\/font><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post was most recently updated on December 11th, 20181. First of all, download the ghettoVCB.sh script, and the example file vmbackup 2. Now, you\u2019ll need to ftp these files to you ESXi host (If you haven\u2019t already enabled ftp access, you can find my guide on how to do it here http:\/\/www.rancidswan.com\/?p=4) 3. Now, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":1,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":232,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/posts\/133\/revisions\/232"}],"wp:attachment":[{"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bleuanus.nl\/index.php\/wp-json\/wp\/v2\/tags?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}