{"id":8624,"date":"2019-12-03T16:28:17","date_gmt":"2019-12-03T06:28:17","guid":{"rendered":"https:\/\/nsrd.info\/blog\/?p=8624"},"modified":"2019-12-03T16:28:23","modified_gmt":"2019-12-03T06:28:23","slug":"basics-helping-the-elderly","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2019\/12\/03\/basics-helping-the-elderly\/","title":{"rendered":"Basics &#8211; Helping the Elderly"},"content":{"rendered":"\n<p>Regular blog visitors will know that I think legacy applications and operating systems have a negative impact on the datacentre. I usually think of <em>legacy<\/em> as being <em>systems which the originating vendor have ceased to support<\/em>. Examples of legacy systems include:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Oracle 7<\/li><li>Windows NT 4<\/li><li>Windows 2000<\/li><li>AIX 5.3<\/li><li>Solaris 2.6<\/li><\/ul>\n\n\n\n<p>(For what it&#8217;s worth, I classify systems like Banyan Vines, SCO Unix and Netware slightly differently &#8211; I think of those more as <em>zombie<\/em> systems since they&#8217;ve effectively outlived their vendors when you still see them around. They still present a challenge, but it&#8217;s a challenge that comes up less frequently since there&#8217;s more acceptance of their state.)<\/p>\n\n\n\n<p>There&#8217;s a lot of thinking that interoperability between the various cloud types and private infrastructure is slowing modernisation, and I get that logic, but my personal feeling is that legacy systems also play a part. They form an anchor within the datacenter that can hold back other services and functions.<\/p>\n\n\n\n<p>From my perspective, there&#8217;s a particular order that you&#8217;d approach when dealing with legacy systems, viz.:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Refactor<\/strong>: Legacy systems represent a risk to the business. They should be eliminated by refactoring or migrating the service to something supported. This does get done a lot of the time, but there are always those malingering systems that no-one is prepared to cough-up the budget for.<\/li><li><strong>Virtualise<\/strong>: This has mixed benefits. You eliminate having to deal with <em>maintenance-by-eBay<\/em> challenges for the underlying hardware, <em>but<\/em> virtualisation platforms also eventually close the door on support for legacy systems.<\/li><li><strong>Hand-holding<\/strong>: If you can&#8217;t refactor\/migrate and you can&#8217;t virtualise, you&#8217;ll be left having to hand-hold the system. That means trying to maintain some old spare parts (see, <em>maintenance-by-eBay<\/em>), and in some extreme cases, even keep staff around just to look after that system. (Though that&#8217;s more likely going to be from zombie systems.)<\/li><\/ol>\n\n\n\n<p>When a system can be refactored, presumably you&#8217;ll end up with something that you can perform data protection against using modern tools. When a system can be virtualised, you should be able to at least do image-based backup and recovery for it.<\/p>\n\n\n\n<p>Hand-holding creates the bigger challenge: just how are you going to back it up, without holding back your entire data protection environment?<\/p>\n\n\n\n<p>In some cases, you&#8217;ll end up maintaining a legacy backup platform just to provide that service. In others, you might use &#8216;simple&#8217; in-built backup mechanisms (e.g., tar\/gz on Unix platforms, NT Backup on older Windows platforms), writing to network mapped storage. <em>However<\/em>, sometimes these systems can be so old that even getting them to talk to network mapped storage can be a pain! (NT4 for instance only talks the original SMB protocol which isn&#8217;t compatible with modern CIFS shares.)<\/p>\n\n\n\n<p>So what if you had to bite the bullet and get something ancient to backup into your current environment?<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"602\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/bigStock-Old-Computer-Motherboard.jpg\" alt=\"Dusty old computer motherboard\" class=\"wp-image-8625\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/bigStock-Old-Computer-Motherboard.jpg 900w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/bigStock-Old-Computer-Motherboard-300x201.jpg 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/bigStock-Old-Computer-Motherboard-768x514.jpg 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption>Old computers (they&#8217;re always dusty&#8230;)<\/figcaption><\/figure>\n\n\n\n<p>I got to thinking about this recently and thought &#8230; can I get Windows NT 4 to backup to a current release of NetWorker? Now, this was before NetWorker 19.2 came out, so I did my testing work gainst NetWorker 19.1.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"479\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/NT4_Login.png\" alt=\"\" class=\"wp-image-8626\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/NT4_Login.png 640w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/NT4_Login-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>NT4 Login &#8211; A Blast from the Past<\/figcaption><\/figure>\n\n\n\n<p>NT4 was first released in 1996 and received its last update (NT4 Service Pack 6a) in 2001. So it&#8217;s well and truly <em>elderly<\/em> in terms of legacy platforms that you might encounter in a datacenter.<\/p>\n\n\n\n<p>Now, the last version of the NetWorker client I could find that I could get to successfully install in NT was NetWorker 7.2.2, which was released in 2006.<\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"347\" height=\"346\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/iStock-shock-surprise.jpg\" alt=\"\" class=\"wp-image-8627\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/iStock-shock-surprise.jpg 347w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/iStock-shock-surprise-300x300.jpg 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/iStock-shock-surprise-150x150.jpg 150w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/iStock-shock-surprise-144x144.jpg 144w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Side Note<\/p>\n\n\n\n<p><em>I found it funny that for years after Windows 2000, then 2003 were released, I&#8217;d find myself lamenting about how Microsoft moved all the controls around and changed interface elements so much between releases. Going back to NT4 was a rude awakening. And let&#8217;s not get started about every folder opening up a new explorer window!<\/em> <em>You definitely get used to features, such as the ability to unzip folders and easily connect to file shares. In some ways, NT4 was like stumbling back onto an 8-bit computing environment.<\/em><\/p>\n<\/div><\/div>\n\n\n\n<p>So, I first suspected I&#8217;d have some challenges against me when I tried to use the NMC Wizard to create a client for the NT4 system &#8230; it sat there on the initial contact attempt to the host spinning and waiting &#8230; and eventually I looked over at the NT4 console and realised the NetWorker client services had crashed!<\/p>\n\n\n\t<div class=\"wp-block-jetpack-gif aligncenter\">\n\t\t<figure>\n\t\t\t\t\t\t\t<div class=\"wp-block-jetpack-gif-wrapper\" style=\"padding-top:79%\">\n\t\t\t\t\t<iframe src=\"https:\/\/giphy.com\/embed\/3o7btVRbshbbaC8Ygg\" title=\"scotty hello computer\"><\/iframe>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<figcaption class=\"wp-block-jetpack-gif-caption gallery-caption\">&#8220;A keyboard? How quaint.&#8221;<\/figcaption>\n\t\t\t\t\t<\/figure>\n\t<\/div>\n\t\n\n\n<p>I did feel a little like Scotty in Star Trek IV at this point, but I was determined to press on.<\/p>\n\n\n\n<p>I configured the client manually &#8211; and of course, a client that old isn&#8217;t going to have the Data Domain Boost library embedded in it, or support client direct. So I configured it with <em>client-direct <\/em>turned off in its properties, and configured it to use a storage node &#8211; first writing to AFTD, and then more ambitiously to a Boost device mounted on the storage node. (Both worked, once I could get the backup to run.)<\/p>\n\n\n\n<p>After getting the client configured, I started a backup &#8230; which promptly failed. The reason, of course, is that a modern NetWorker server sends a variety of arguments to the &#8216;save&#8217; command that requires a more modern client to understand them. (A minimum of NetWorker 7.4.)<\/p>\n\n\n\n<p>Would I be defeated? I was taught from an early stage of my career that being able to write scripts is an essential IT activity, and I think my original sysadmin team would have all thrown their shoes at me in disgust if I&#8217;d have given up this early. There had to be some way of getting it all to work.<\/p>\n\n\n\n<p>I verified quickly enough that I could do a manual save from the command line on the client &#8211; getting the backup to go to the right pool, with a specified command line. The NetWorker 7.2.2 client&#8217;s <strong>winworkr.exe<\/strong> GUI wasn&#8217;t going to cut it for recovery purposes &#8212; it just didn&#8217;t want to work with NT4. However, I could recover using the <strong>recover.exe <\/strong>command-line option.<\/p>\n\n\n\n<p>So, backup and recovery worked, but being able to do a manual backup alone is boring, right? Equally, I could have a simple DOS batch file that would replace the save command (e.g., &#8220;savent4.bat&#8221;) which just called the appropriate save arguments &#8211; <em>but<\/em>, this would hard-code the pool and retention time, etc., into the save command. Worse, it would encode the <em>save-set<\/em> name as well!<\/p>\n\n\n\n<p>At this point, I really rolled up my sleeve, and my husband endured a day of me cursing as I wrestled mightily with all the failures and limitations that were NT4 DOS\/Batch commands. How anyone managed to do <em>anything<\/em> with NT4 DOS\/Batch commands was beyond me. Essentially, I had to be able to parse the <em>save<\/em> arguments being received by the NetWorker client and strip out the ones I was interested in, such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The name of the saveset<\/li><li>The pool<\/li><li>The retention time<\/li><li>The level, and if the level was non-full, the anchor save time<\/li><\/ul>\n\n\n\n<p>Suffice it to say that NT4&#8217;s DOS\/Batch command scripting in terms of parsing command-line arguments did not endure itself to me. After a solid day of effort, I was ready to give up and declare myself defeated.<\/p>\n\n\n\n<p>It was so mind-numbingly annoying, I thought to myself the next morning in the shower &#8230; the argument parsing that I needed to do was so simple that it&#8217;d take me less than 10 minutes to write a Perl script to do it.<\/p>\n\n\n\t<div class=\"wp-block-jetpack-gif aligncenter\">\n\t\t<figure>\n\t\t\t\t\t\t\t<div class=\"wp-block-jetpack-gif-wrapper\" style=\"padding-top:80%\">\n\t\t\t\t\t<iframe src=\"https:\/\/giphy.com\/embed\/5VKbvrjxpVJCM\" title=\"surprise\"><\/iframe>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<figcaption class=\"wp-block-jetpack-gif-caption gallery-caption\">Perl to the rescue!<\/figcaption>\n\t\t\t\t\t<\/figure>\n\t<\/div>\n\t\n\n\n<p>Light-bulb moment! A bit of quick searching, and yes, <strong><a href=\"http:\/\/strawberryperl.com\/\">Strawberry Perl<\/a><\/strong> still has installers that can run on NT4!<\/p>\n\n\n\n<p>Trying to call a Perl script directly as the backup command didn&#8217;t seem like a good place to start, so I wrote a simple batch script, &#8220;savepmdg.bat&#8221; and made <em>that<\/em> the backup command for the NT4 client. That script looked like this:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">@echo off\nsetlocal\nPATH=C:\\TEMP\\strawberry-perl-5.8.8.2\\perl\\bin;Program Files\\Legato\\nsr\\bin;C:\\WINNT;C:\\WIN\nNT\\SYSTEM32\nset OUTPATH=\"C:\\Program Files\\Legato\\nsr\\bin\"\necho %* 1>%OUTPATH%\\args.txt\n\nperl \"C:\\Program Files\\Legato\\nsr\\bin\\save.pl\" %*\n<\/code><\/pre>\n\n\n\n<p>OK, so the trick then would be the save.pl script. Normally I&#8217;d work with the Perl Getopts package, but for something this simple and predictable, I didn&#8217;t need to go that far &#8211; I could just do a read of ARGV instead:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">my @saveArgs = @ARGV;\n\nmy $server=\"localhost\";\nmy $pool=\"Default\";\nmy $level=\"full\";\nmy $browse = \"tomorrow\";\nmy $retention = \"tomorrow\";\nmy $masquerade = \"\";\nmy $timestamp = \"\";\n\n# Process this way to avoid having to hard-code all possible options\nmy $argCount=@ARGV+0;\nfor (my $i=0; $i&lt;$argCount; $i++) {\n\tif ($ARGV[$i] eq \"-s\") {\n\t\t$server=$ARGV[$i+1];\n\t}\n\tif ($ARGV[$i] eq \"-b\") {\n\t\t$pool = $ARGV[$i+1];\n\t\tif ($pool =~ \/\\s\/) {\n\t\t\t$pool = \"\\\"\" . $pool . \"\\\"\";\n\t\t}\n\t}\n\tif ($ARGV[$i] eq \"-t\") {\n\t\t$timestamp = \" -t \" . $ARGV[$i+1] . \" \";\n\t}\n\tif ($ARGV[$i] eq \"-l\") {\n\t\t$level = $ARGV[$i+1];\n\t}\n\tif ($ARGV[$i] eq \"-w\") {\n\t\t$browse = $ARGV[$i+1];\n\t}\n\tif ($ARGV[$i] eq \"-y\") {\n\t\t$retention = $ARGV[$i+1];\n\t}\n\tif ($ARGV[$i] eq \"-m\") {\n\t\t$masquerade = \" -m \" . $ARGV[$i+1] . \" \";\n\t}\n}\n\nmy $savesetName = $saveArgs[-1];\n\nmy $command = \"save.exe -LL -q -s $server -l $level -b $pool -w \\\"$browse\\\" -y \\\"$retention\\\" $masquerade $timestamp -N $savesetName $savesetName\";\nsystem($command) or exit(1);\nexit(0);\n<\/code><\/pre>\n\n\n\n<p>Once the script was in place, it was time for a good old-fashioned huzzah! (Although quietly, it was very early in the morning.)<\/p>\n\n\n\n<p>With this in place, I was able to run backups from NetWorker 19.1 of a NetWorker 7.2.2 client on Windows NT4, with the NetWorker server still able to assign pool, level, retention time, etc., automatically. In fact, here&#8217;s what it looked like &#8211; the little Perl script and batch file having been called, with the savesets being correctly enumerated:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1198\" height=\"158\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/enumerated-savesets.png\" alt=\"\" class=\"wp-image-8631\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/enumerated-savesets.png 1198w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/enumerated-savesets-300x40.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/enumerated-savesets-1024x135.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/enumerated-savesets-768x101.png 768w\" sizes=\"auto, (max-width: 1198px) 100vw, 1198px\" \/><figcaption>Backing up NT4 to NetWorker 19.1<\/figcaption><\/figure>\n\n\n\n<p>There are a few lessons to take from this:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Don&#8217;t be nostalgic for NT4.<\/li><li>NT batch file &#8216;programming&#8217;. Ugh.<\/li><li>You&#8217;re still better off, wherever possible, refactoring\/migrating your legacy systems and applications.<\/li><li>Automation is still king: If you&#8217;re prepared to put in a little effort, you can get the efforts you need out of a product built as a framework.<\/li><\/ul>\n\n\n\n<p>So what&#8217;s the advantage of this over say, keeping an old NetWorker 7.5, or 7.6, server installed somewhere? Well, that server is obviously out of support &#8211; you&#8217;ll probably be using rusty old hardware that&#8217;s also under a <em>maintenance-by-eBay<\/em> support contract, too. At least, in a configuration like this, you&#8217;re running up to date server code, on a modern system (probably even, like in my case, a virtualised system) so that you&#8217;ve got a good level of control over the environment. <em>Oh, and that NT4 system isn&#8217;t acting as an anchor, dragging back transformation within your datacenter.<\/em><\/p>\n\n\n\n<p>All in all, it was a nostalgic and fun experiment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Regular blog visitors will know that I think legacy applications and operating systems have a negative impact on the datacentre.&hellip;<\/p>\n","protected":false},"author":1,"featured_media":8625,"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":[4,6,16],"tags":[1310,1542],"class_list":["post-8624","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aside","category-basics","category-networker","tag-legacy","tag-nt4"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2019\/12\/bigStock-Old-Computer-Motherboard.jpg","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-2f6","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/8624","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=8624"}],"version-history":[{"count":5,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/8624\/revisions"}],"predecessor-version":[{"id":8634,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/8624\/revisions\/8634"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media\/8625"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=8624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=8624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=8624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}