{"id":3577,"date":"2012-02-13T19:46:36","date_gmt":"2012-02-13T09:46:36","guid":{"rendered":"http:\/\/nsrd.info\/blog\/?p=3577"},"modified":"2018-12-11T14:38:44","modified_gmt":"2018-12-11T04:38:44","slug":"differentiating-differentials","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2012\/02\/13\/differentiating-differentials\/","title":{"rendered":"Differentiating Differentials"},"content":{"rendered":"<p>Pretty much everyone understands full and incremental backups in NetWorker. A full backup is a backup of everything, and an incremental is a backup of everything that has changed since the last backup, regardless of what level that is.<\/p>\n<p>On the other hand, differential backups can sometimes throw people out for a while longer; particularly since NetWorker is more flexible and offers 9 differential levels.<\/p>\n<p>I like to visualise backup levels as follows:<\/p>\n<figure id=\"attachment_3578\" aria-describedby=\"caption-attachment-3578\" style=\"width: 372px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3578 \" title=\"Full, Incr, Incr, 5\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level5.png\" alt=\"Full, Incr, Incr, 5\" width=\"372\" height=\"313\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level5.png 372w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level5-300x252.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level5-356x300.png 356w\" sizes=\"auto, (max-width: 372px) 100vw, 372px\" \/><\/a><figcaption id=\"caption-attachment-3578\" class=\"wp-caption-text\">Figure 1: Full, incr, incr, level 5<\/figcaption><\/figure>\n<p>This represents a full backup (which is drawn as a &#8220;line in the sand&#8221;), two subsequent incrementals, and a level 5 backup following the second incremental.<\/p>\n<p>The first incremental backs up everything that has changed since the previous backup, which in this case is a full, thus the end-point for its arrow is the full backup line. The second incremental again backs up everything that has changed since the previous backup &#8211; the first incremental. As such, its arrow end-point is the first incremental backup.<\/p>\n<p>Finally, the level 5 backup bypasses the incrementals and backs up everything that has changed since the full, so its arrow end-point goes all the way back to the full.<\/p>\n<p>If you&#8217;re wondering about what makes the differential level 5 significant there &#8211; nothing. It doesn&#8217;t matter whether you use a 5, 3, 2, 8, etc. The differential numbers only have significance when you use more than one of them in a single schedule. For instance, the above backup could have been equally achieved with:<\/p>\n<figure id=\"attachment_3579\" aria-describedby=\"caption-attachment-3579\" style=\"width: 372px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3579\" title=\"Full, Incr, Incr, 1\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level1.png\" alt=\"Full, Incr, Incr, 1\" width=\"372\" height=\"313\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level1.png 372w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level1-300x252.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_level1-356x300.png 356w\" sizes=\"auto, (max-width: 372px) 100vw, 372px\" \/><\/a><figcaption id=\"caption-attachment-3579\" class=\"wp-caption-text\">Figure 2: Full, incr, incr, level 1<\/figcaption><\/figure>\n<p>This allows us to establish our first set of criteria for differential levels:<\/p>\n<blockquote><p><strong>Rule 1<\/strong>: If only using one differential level in a schedule, the number is irrelevant.<\/p>\n<p><strong>Guideline 1<\/strong>: If only using one differential level, start in the middle. That way, if you have to slot in another differential level later, you&#8217;ve got room on &#8216;either side&#8217;.<\/p><\/blockquote>\n<p>Differentials in NetWorker become more complex when you have more than one level involved. Let&#8217;s consider a slight change to the above level diagram:<\/p>\n<figure id=\"attachment_3580\" aria-describedby=\"caption-attachment-3580\" style=\"width: 372px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_5_1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3580\" title=\"Full, Incr, Incr, 5, 1\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_5_1.png\" alt=\"Full, Incr, Incr, 5, 1\" width=\"372\" height=\"313\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_5_1.png 372w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_5_1-300x252.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_5_1-356x300.png 356w\" sizes=\"auto, (max-width: 372px) 100vw, 372px\" \/><\/a><figcaption id=\"caption-attachment-3580\" class=\"wp-caption-text\">Figure 3: Full, incr, incr, level 5, level 1<\/figcaption><\/figure>\n<p>In this, we&#8217;ve got a fairly standard appearing set of levels until we hit the differential level 1; this follows a 5, and backs up everything that has changed since the full. If we turn to the <strong><em>nsr_schedule<\/em><\/strong> man page for a clarification here, we see:<\/p>\n<blockquote><p>&#8220;The levels 1 through 9 cause all files to be saved which have been modified since any lower level was performed. As an example, if you did a full save on Monday, followed by a level 3 save on Tuesday, a subsequent level 3 save on Wednesday would contain all files modified or added since the Monday full save.&#8221;<\/p><\/blockquote>\n<p>So this leads to our second set of criteria when dealing with differential levels:<\/p>\n<blockquote><p><strong>Rule 2<\/strong>: Any differential level will backup all files which have been modified since any lower&nbsp;has been performed.<\/p>\n<p><strong>Guideline 2<\/strong>: Think of a full backup as &#8216;level 0&#8217;, and the differential rules make more sense.<\/p><\/blockquote>\n<p>Thus, if we swap around the two differential levels in the above diagram, our backup behaviour becomes markedly different:<\/p>\n<figure id=\"attachment_3583\" aria-describedby=\"caption-attachment-3583\" style=\"width: 370px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3583\" title=\"Full, Incr, Incr, 1, 5\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5.png\" alt=\"Full, Incr, Incr, 1, 5\" width=\"370\" height=\"313\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5.png 370w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5-300x253.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5-354x300.png 354w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/a><figcaption id=\"caption-attachment-3583\" class=\"wp-caption-text\">Figure 4: Full, incr, incr, level 1, level 5<\/figcaption><\/figure>\n<p>The behaviour up to and including the level 1 backup mirrors what we saw in figures 1 and 2 \u2013 incrementals going back to the full, and the first differential performed also going back to the full. However, the level 5 backup will only backup those changes which have occurred since the level 1 backup &#8211; 1 is lower than 5, so it will &#8220;cause all files to be saved which have been modified since any lower level save was performed&#8221; to be triggered when the 5 is run.<\/p>\n<p>Our last example for consideration is what happens when we throw another differential level in; let&#8217;s go for a level 3:<\/p>\n<figure id=\"attachment_3584\" aria-describedby=\"caption-attachment-3584\" style=\"width: 370px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5_3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3584\" title=\"Full, Incr, Incr, 1, 5, 3\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5_3.png\" alt=\"Full, Incr, Incr, 1, 5, 3\" width=\"370\" height=\"313\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5_3.png 370w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5_3-300x253.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2012\/02\/diff_2incr_1_5_3-354x300.png 354w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/a><figcaption id=\"caption-attachment-3584\" class=\"wp-caption-text\">Figure 5: Full, incr, incr, level 1, level 5, level 3<\/figcaption><\/figure>\n<p>Focusing on the &#8220;since any lower level save was performed&#8221;, if we do a level 3 backup after the level 5, it too will backup all files that have changed since the level 1 backup, incorporating not only the changes in the level 5 backup, but any changes since that point.<\/p>\n<p>To the uninitiated, NetWorker&#8217;s differential backups may seem a little challenging, but once you get the hang of them via the two sets of guidelines above, you&#8217;ll find they&#8217;re very straight forward.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pretty much everyone understands full and incremental backups in NetWorker. A full backup is a backup of everything, and an&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":[5,6,16],"tags":[319,320,399,462,532],"class_list":["post-3577","post","type-post","status-publish","format-standard","hentry","category-backup-theory","category-basics","category-networker","tag-differential","tag-differentials","tag-full","tag-incremental","tag-level"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-VH","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/3577","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=3577"}],"version-history":[{"count":1,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/3577\/revisions"}],"predecessor-version":[{"id":7486,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/3577\/revisions\/7486"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=3577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=3577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=3577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}