{"id":59,"date":"2008-02-09T16:47:28","date_gmt":"2008-02-09T15:47:28","guid":{"rendered":"http:\/\/www.amikkelsen.com\/?p=59"},"modified":"2008-02-14T15:00:21","modified_gmt":"2008-02-14T14:00:21","slug":"vranger-script","status":"publish","type":"post","link":"https:\/\/www.amikkelsen.com\/?p=59","title":{"rendered":"vRanger script"},"content":{"rendered":"<p>At work we use vRanger to take DR snapshots of all our VM&#8217;s (more than 370).<\/p>\n<p>We decided that we would only snapshot drive 0 and use a TSM client to backup tha 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>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 (do to lack of storage space on the server)<br \/>\n3.<br \/>\nCall the .cmd file that holds the information on witch VM&#8217;s to snapshot (Based on weekday &#8211; one file for each day).<br \/>\n4.<br \/>\nStart TSM (send the VM&#8217;s snapshots to tape)<br \/>\n5.<br \/>\nSend a status mail <\/p>\n<p>We then created 7 .cmd files (one for each weekday) in witch we add a line for each VM to snapshot that day.<br \/>\n(You have to use vRanger GUI to choose witch drives to snapshot &#8211; changed from 3.17 -> 3.20)<\/p>\n<p>I know this solution isn&#8217;t very dynamic but i works.<\/p>\n<p>I&#8217;m in the process of upgrading the script so that it dynamicly creates a list of witch VM&#8217;s to snapshot based on a custom field in VC.<br \/>\nFurthermore i also want to create a script to update the vRanger database with witch drives to snapshot based on a custom field in VC.<\/p>\n<p>I will upload the updated script as soon as it is done.<br \/>\nYou can download the current script <a href=\"http:\/\/www.amikkelsen.com\/files\/vranger\/vranger_dr_script_v1.0.zip\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At work we use vRanger to take DR snapshots of all our VM&#8217;s (more than 370). We decided that we would only snapshot drive 0 and use a TSM client to backup tha data in each VM and that the snapshots were only to be taken outside working hours. These choices gave us some problems\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.amikkelsen.com\/?p=59\">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,15,12,18,16],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-disaster-recovery","category-scripting","category-security","category-virtual-center","category-vranger","category-esx-x"],"_links":{"self":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/59","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=59"}],"version-history":[{"count":0,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}