{"id":21,"date":"2009-01-25T21:28:12","date_gmt":"2009-01-25T21:28:12","guid":{"rendered":"http:\/\/nsrd.wordpress.com\/?p=21"},"modified":"2018-12-12T16:37:49","modified_gmt":"2018-12-12T06:37:49","slug":"using-probe-based-backups-in-networker","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2009\/01\/25\/using-probe-based-backups-in-networker\/","title":{"rendered":"Using probe based backups in NetWorker"},"content":{"rendered":"<p>Probe based backups were introduced in NetWorker 7.5, though you might think they had already existed in there, given the limited coverage they\u2019ve been given thus far. Most announcements relating to NetWorker 7.5 have touted the virtualisation improvements, IPv6 support, etc.<\/p>\n<p>Like so many things related to backup, some of the most useful things are the least \u201csexy\u201d and thus get the least attention.<\/p>\n<p><strong>What is a probe backup?<\/strong><br \/>\nProbe backups are a new class of scheduled backups that rely on executing a custom command\/script on one or more clients within a group to determine whether the backup should be run. Additionally, rather than running just once per day, probe backups are designed to be run as frequently as necessary (as frequently as every 15 minutes) over a defined start and stop window.<\/p>\n<p>To better understand how probe backups work, we need to first remember how standard groups work. These work as follows:<\/p>\n<ul>\n<li> At a preset time of the day, the group starts.<\/li>\n<li> A backup attempt is made on all clients that belong to the group.<\/li>\n<li> Optionally the group may start more frequently than once daily.<\/li>\n<\/ul>\n<p>That\u2019s about it with group based backups &#8211; they\u2019re good for regular, routine backups. But they don\u2019t cover all the options &#8211; nor would you expect them to.<\/p>\n<p>There are a few of important scenarios that regular groups don\u2019t help with which has traditionally required additional (and at times, messy) scripting. These are:<\/p>\n<ul>\n<li> Having a client process determine whether a backup is required.<\/li>\n<li> Backing up after a particular event on a client has occurred when that event isn\u2019t in the control of the backup administrator.<\/li>\n<li> Cross-system sychronisation &#8211; i.e., backing up only when say, key applications are shutdown on every client within a group.<\/li>\n<\/ul>\n<p>For the first issue, the traditional mechanism was to configure client-initiated backups. However, these violate centralisation of the environment, and introduce a variety of administrative headaches. For the second issue (e.g., caused by the need to export a non-supported database for filesystem backups), typically the DBA and the backup administrator would agree on a time at which point backups would start. This could lead to all sorts of issues if exports didn\u2019t finish in time, etc. For the final option, a variety of mechanisms could be deployed that would normally consist of savepnpc and\/or groups running groups.<\/p>\n<p>So, back to the question \u2013&nbsp;<strong>what is a probe backup?<\/strong> \u2013 it\u2019s a variant to the standard group that allows all of the above, and more. Groups that are configured for probe backups have:<\/p>\n<ul>\n<li> A time at which point probing starts<\/li>\n<li> A time at which point probing stops<\/li>\n<li> The frequency, in minutes, of the probing<\/li>\n<li> A success criteria \u2013&nbsp;should all probes succeed, or is it sufficient for one probe to succeed?<\/li>\n<li> (Optionally) how many days should elapse following a successful backup before a new backup is run, regardless of whether probes have been successful or not.<\/li>\n<\/ul>\n<p>This configuration area looks like the following:<\/p>\n<figure id=\"attachment_22\" aria-describedby=\"caption-attachment-22\" style=\"width: 450px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22\" title=\"Group Probe Settings\" src=\"http:\/\/nsrd.files.wordpress.com\/2009\/01\/probegroup.png\" alt=\"Group Probe Settings\" width=\"450\" height=\"301\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2009\/01\/probegroup.png 868w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2009\/01\/probegroup-300x201.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2009\/01\/probegroup-447x300.png 447w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><figcaption id=\"caption-attachment-22\" class=\"wp-caption-text\">Group Probe Settings<\/figcaption><\/figure>\n<p>Once a group has been configured as a probe group (by turning on the \u201cProbe based group\u201d checkbox), the standard group start time is disregarded by NetWorker, and instead the probe start time\/end time as well as the interval becomes the primary governing factor in the execution of the group.<\/p>\n<p>In order for the probe based backups to work, we must also then define probes, and assign those probes to one or more clients in the group. (There must be at least one client in the group with a probe associated with it.)<\/p>\n<p>The probe is actually defined as a new NetWorker resource in the configuration (\u201cNSR Probe\u201d). Within the NetWorker configuration, this is actually very basic indeed:<\/p>\n<figure id=\"attachment_28\" aria-describedby=\"caption-attachment-28\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-28\" title=\"NSR Probe resource\" src=\"http:\/\/nsrd.files.wordpress.com\/2009\/01\/probeconfig1.png\" alt=\"NSR Probe resource\" width=\"400\" height=\"147\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2009\/01\/probeconfig1.png 400w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2009\/01\/probeconfig1-300x110.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><figcaption id=\"caption-attachment-28\" class=\"wp-caption-text\">NSR Probe resource<\/figcaption><\/figure>\n<p>The probe has a name by which it is referenced (in the above, \u201cBasic Probe\u201d), and the command; command options (i.e., arguments) may be included as well. The probe command, like custom backup commands, must either start with nsr or save, and must be stored in the same location as the save and nsrexecd binaries on the client. So in the above example, we\u2019ve got a probe command written in Unix shell called \u201cnsrprobe.sh\u201d that will reside on one or more clients in the group.<\/p>\n<p>Once the probe resource has been configured, it must be referenced in the client configuration:<\/p>\n<figure id=\"attachment_29\" aria-describedby=\"caption-attachment-29\" style=\"width: 450px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29\" title=\"Client probe settings\" src=\"http:\/\/nsrd.files.wordpress.com\/2009\/01\/probeclient2.png\" alt=\"Client probe settings\" width=\"450\" height=\"388\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2009\/01\/probeclient2.png 854w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2009\/01\/probeclient2-300x259.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2009\/01\/probeclient2-347x300.png 347w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><figcaption id=\"caption-attachment-29\" class=\"wp-caption-text\">Client probe settings<\/figcaption><\/figure>\n<p>In the above example, the probe resource assigned to a client is the \u201cBasic Probe\u201d.<\/p>\n<p>At this point, NetWorker doesn\u2019t really care what the probe runs &#8211; it could be something very basic (e.g., a check to see if all clients are connected to the network), or it could be quite complex. All NetWorker cares about is the exit code of the probe.<\/p>\n<p>An exit code of 0 means that the probe is successful, indicating backup is required; an exit code of 1 means that the probe is unsuccessful and therefore a backup isn\u2019t required.<\/p>\n<p>The backup will then be executed so long as the required probes are successful (all vs any).<\/p>\n<p>So that you know what is going on, logging is performed as follows:<\/p>\n<ul>\n<li> To indicate whether a probe ran<\/li>\n<li> To indicate if a client that required a probe command to be present didn\u2019t have the probe command<\/li>\n<li> To indicate if probing has been run, but a backup wasn\u2019t required<\/li>\n<li> To indicate if probing has been run, and a backup was required.<\/li>\n<\/ul>\n<p>I\u2019m presuming that there\u2019s also logging done if a group has been configured to run after a nominated number of days even if probing hasn\u2019t been successful, but I haven\u2019t played around with that feature yet.<\/p>\n<p>Once configured, the probe backups work quite well and with minimum fuss, running backups as necessary. Given the frequency at which they can be run, they offer considerable flexibility &#8211; if for instance, you\u2019ve got an array that isn\u2019t supported by NetWorker you might even find probe backups an appropriate mechanism for pseudo-integration of snapshot backups into your environment (aka PowerSnap, albeit not quite as flexible).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Probe based backups were introduced in NetWorker 7.5, though you might think they had already existed in there, given the&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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[16],"tags":[1249,757],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-networker","tag-networker","tag-probe"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-l","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/21","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=21"}],"version-history":[{"count":1,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":7700,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/21\/revisions\/7700"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}