{"id":5477,"date":"2015-03-10T17:38:49","date_gmt":"2015-03-10T07:38:49","guid":{"rendered":"http:\/\/nsrd.info\/blog\/?p=5477"},"modified":"2018-12-11T13:00:19","modified_gmt":"2018-12-11T03:00:19","slug":"basics-running-vmware-protection-policies-from-the-command-line","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2015\/03\/10\/basics-running-vmware-protection-policies-from-the-command-line\/","title":{"rendered":"Basics &#8211; Running VMware Protection Policies from the Command Line"},"content":{"rendered":"<p>If you&#8217;ve been adapting VMware&nbsp;Protection Policies via VBA in your environment (like so many businesses have been!), you&#8217;ll likely reach a point where you want to be able to run a protection policy&nbsp;from the command line.&nbsp;Two immediate&nbsp;example&nbsp;scenarios would be:<\/p>\n<ul>\n<li>Quick start of a policy via remote access*<\/li>\n<li>External scheduler control<\/li>\n<\/ul>\n<p>(* May require remote command line access. You can tell I&#8217;m still a Unix fan, right?)<\/p>\n<p>Long-term users of NetWorker will know a group can be&nbsp;initiated from the backup server by using the&nbsp;<em>savegrp<\/em> command. When EMC introduced VMware&nbsp;Protection Policies, they also introduced a new command,&nbsp;<em>nsrpolicy<\/em>.<\/p>\n<p>The simplest way to invoke a policy is as follows:<\/p>\n<pre># <strong>nsrpolicy -p <em>policyName<\/em><\/strong><\/pre>\n<p>For example:<\/p>\n<pre>[root@centaur ~]# <strong>nsrpolicy -p SqueezeProtect<\/strong>\n99528:nsrpolicy: Starting Vmware Protection Policy 'SqueezeProtect'.\n97452:nsrpolicy: Starting action 'SqueezeProtect\/SqueezeBackup' with command: 'nsrvba_save -s centaur -j 544001 -L incr -p SqueezeProtect -a SqueezeBackup'.\n97457:nsrpolicy: Action 'SqueezeProtect\/SqueezeBackup's log will be in \/nsr\/logs\/policy\/SqueezeProtect\/544002.\n97461:nsrpolicy: Action 'SqueezeProtect\/SqueezeBackup' succeeded.\n99529:nsrpolicy: Vmware Protection Policy 'SqueezeProtect' succeeded.<\/pre>\n<p>There you&nbsp;go \u2013&nbsp;it&#8217;s that easy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve been adapting VMware&nbsp;Protection Policies via VBA in your environment (like so many businesses have been!), you&#8217;ll likely reach&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6,16,1213],"tags":[138,1218,749,1163],"class_list":["post-5477","post","type-post","status-publish","format-standard","hentry","category-basics","category-networker","category-vba","tag-backup","tag-nsrpolicy","tag-policy","tag-vba"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-1ql","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/5477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/comments?post=5477"}],"version-history":[{"count":2,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/5477\/revisions"}],"predecessor-version":[{"id":7435,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/5477\/revisions\/7435"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=5477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=5477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=5477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}