{"id":74,"date":"2008-07-07T21:52:19","date_gmt":"2008-07-07T20:52:19","guid":{"rendered":"http:\/\/www.amikkelsen.com\/?p=74"},"modified":"2009-11-03T22:03:09","modified_gmt":"2009-11-03T21:03:09","slug":"vranger-script-version-20-released","status":"publish","type":"post","link":"https:\/\/www.amikkelsen.com\/?p=74","title":{"rendered":"vRanger Script version 2.0 &#8211; released"},"content":{"rendered":"<p>I\u00e2\u20ac\u2122m now done with the new script and it\u00e2\u20ac\u2122s working perfectly.<\/p>\n<p><strong>Background for the script:<\/strong><\/p>\n<p>At work we use vRanger to take DR snapshots of all our VM&#8217;s (more than 400).<\/p>\n<p>We decided that we would only snapshot drive 0 and use a TSM client to backup the data in each VM and that the snapshots were only to be taken outside working hours.<br \/>\nThese choices gave us some problems when running vRanger because we couldn&#8217;t schedule the snapshots from vRanger.<\/p>\n<p>Because we have more than 400 VM\u00e2\u20ac\u2122s we had to divide the list of witch VM\u00e2\u20ac\u2122s to backup, into 14 days.<br \/>\nThis means that one specific VM will only be snapshotted every 2 weeks.<\/p>\n<p>In Virtual Center we created a custom field (=Backup) to tell the script witch VM&#8217;s to snapshot witch days.<br \/>\nWe use full weekdays together with Even \/ Odd for dividing the VM&#8217;s into 14 days.<br \/>\nEx. &#8220;Monday-Even&#8221; or &#8220;Sunday-Odd&#8221;<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"http:\/\/www.amikkelsen.com\/images\/vc_backup.jpg\" alt=\"\" width=\"314\" height=\"258\" \/><\/p>\n<p>The solution was to make our own script that would handle the logic and just use vRanger to do the actual snapshotting.<br \/>\nWe created a VBS script to hold the logic.<br \/>\n1.<br \/>\nCreate a log file<br \/>\n2.<br \/>\nDelete snapshots from the day before (due to lack of storage space on the server)<br \/>\n3.<br \/>\nGenerate the .cmd file from information in a custom field (Backup) in VC<br \/>\n4.<br \/>\nCall the .cmd file that was created earlier and contains the information on which VM&#8217;s to snapshot (Based on weekday &#8211; one file for each day).<br \/>\n5.<br \/>\nStart TSM (send the VM&#8217;s snapshots to tape)<br \/>\n6.<br \/>\nSend a status mail<\/p>\n<p>(You have to use vRanger GUI to choose which drives to snapshot &#8211; changed from 3.17 -&gt; 3.20)<\/p>\n<p>I know this solution isn&#8217;t very dynamic but i works.<\/p>\n<p>You can download the new script <a href=\"http:\/\/www.amikkelsen.com\/?page_id=307\">here<\/a> \u00e2\u20ac\u201c version 2.0.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u00e2\u20ac\u2122m now done with the new script and it\u00e2\u20ac\u2122s working perfectly. Background for the script: At work we use vRanger to take DR snapshots of all our VM&#8217;s (more than 400). We decided that we would only snapshot drive 0 and use a TSM client to backup the data in each VM and that the\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.amikkelsen.com\/?p=74\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,4,18],"tags":[],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-disaster-recovery","category-scripting","category-vranger"],"_links":{"self":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=74"}],"version-history":[{"count":1,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":309,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions\/309"}],"wp:attachment":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}