{"id":1758,"date":"2010-01-20T08:58:09","date_gmt":"2010-01-19T22:58:09","guid":{"rendered":"http:\/\/nsrd.info\/blog\/?p=1758"},"modified":"2010-01-20T08:58:09","modified_gmt":"2010-01-19T22:58:09","slug":"networker-incremental-manual-backups","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2010\/01\/20\/networker-incremental-manual-backups\/","title":{"rendered":"NetWorker and Incremental Manual Backups"},"content":{"rendered":"<p>There was a recent posting on the NetWorker mailing list regarding manual backups and whether they&#8217;re incrementals or not. The short answer of course is they&#8217;re not. The more challenging answer is whether or not you can actually generate a manual incremental backup.<\/p>\n<p>You may think that as of 7.5 onwards, where the level is expressly ignored for manual backups, that this isn&#8217;t possible:<\/p>\n<pre>[root@tara ~]# save -l incr -b Default \/tmp\nClient initiated backup.Option '-l' is ignored and backup is performed at level adhoc<\/pre>\n<p>After all, in 7.4 and below, if you ran the above command anyway, you wouldn&#8217;t have actually got an incremental backup of \/tmp anyway \u2013 sure, it would have been <em>tagged<\/em> as an incremental backup, but that&#8217;s not the way that non-complete backup is actually generated in NetWorker. You see, NetWorker needs a timestamp to base a non-full backup against. That timestamp is going to be the <em>nsavetime<\/em> of a previous backup. (For an incremental, it will be the <em>nsavetime<\/em> of whatever the most recent backup for the saveset was \u2013 for differentials, it may vary.)<\/p>\n<p>I&#8217;ll walk through an example of getting an incremental manual backup. It will still be tagged in NetWorker as a manual backup (that just is unavoidable these days), but it will at least just be an incremental. To start with, I need a full backup of something. I&#8217;ve got a full backup of my \/usr\/share directory as its own saveset here:<\/p>\n<pre>[root@tara ~]# mminfo -q \"name=\/usr\/share\" -r volume,level,sumsize,nsavetime\n volume\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 lvl\u00a0\u00a0 size\u00a0 save time\n800803L4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 full 1244 MB 1263844861<\/pre>\n<p>Now, in order to be able to run a &#8216;manual&#8217; incremental backup against this, I need to run save with a <em>-t<\/em> (for time) option &#8211; and the time I use will be 1263844861, which will backup all changes to that directory since the last backup.<\/p>\n<p>So the command becomes:<\/p>\n<pre>[root@tara ~]# save -q -LL -t 1263844861 \/usr\/share\n66135:save: NSR directive file (\/.nsr) parsed\nsave: \/usr\/share\u00a0 251 KB 00:00:20\u00a0\u00a0\u00a0 588 files\ncompleted savetime=1263880379<\/pre>\n<p>Note there that I haven&#8217;t included a level. If I had, even with the &#8220;-t&#8221; option included, NetWorker would have still generated the warning\/error about ignoring the level for client initiated backups. However, I can confirm that it&#8217;s <em>effectively<\/em> an incremental backup by checking mminfo and looking at the sumsize field again:<\/p>\n<pre>[root@tara ~]# mminfo -q \"name=\/usr\/share\" -r volume,level,sumsize,nsavetime\n volume\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 lvl\u00a0\u00a0 size\u00a0 save time\n800803L4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 full 1244 MB 1263844861\n800803L4\u00a0\u00a0\u00a0\u00a0\u00a0 manual 251 KB 1263880379<\/pre>\n<p>As you can see, we&#8217;ve got a full backup, and a subsequent manual backup that is effectively an incremental against the full.<\/p>\n<p>Where is this useful? I wouldn&#8217;t imagine that it&#8217;s something you should be making use of in normal operations. However, in an emergency, when there&#8217;s an upgrade about to be done and you need to walk someone through doing an incremental backup before the upgrade without giving them administrative access to the backup server, this would be the sort of technique that can come in handy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There was a recent posting on the NetWorker mailing list regarding manual backups and whether they&#8217;re incrementals or not. 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,20],"tags":[462,575,594,647,852],"class_list":["post-1758","post","type-post","status-publish","format-standard","hentry","category-networker","category-scripting","tag-incremental","tag-manual","tag-mminfo","tag-nsavetime","tag-save"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-sm","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/1758","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=1758"}],"version-history":[{"count":0,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/1758\/revisions"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=1758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=1758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=1758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}