{"id":1268,"date":"2009-11-02T08:51:32","date_gmt":"2009-11-01T22:51:32","guid":{"rendered":"http:\/\/nsrd.wordpress.com\/?p=1268"},"modified":"2009-11-02T08:51:32","modified_gmt":"2009-11-01T22:51:32","slug":"why-nsrtmp-is-wrong","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/","title":{"rendered":"Why \/nsr\/tmp is wrong"},"content":{"rendered":"<p>On both Windows and Unix platforms, NetWorker maintains a &#8220;tmp&#8221; directory within nsr.<\/p>\n<p>This directory contains a variety of information, from output received by savegroup completion notifications to lock\/state files for certain NetWorker resource.<\/p>\n<p>To first explain why \/nsr\/tmp is wrong, let me first tell you a little story about the first system administration team I joined. They rigorously followed <a title=\"RFC 1178\" href=\"http:\/\/www.faqs.org\/rfcs\/rfc1178.html\" target=\"_blank\">RFC-1178<\/a>, and it&#8217;s ever since then that I&#8217;ve also done my best to follow that RFC \u2013 I&#8217;ve even written an article here on the blog about choosing appropriate names for backup servers. Sometime before I joined the team, they were in the process of setting up a replacement DNS server for local datacentre. There was either a dispute about what to name it, or it was only meant to hang around for a short while, but for whatever reason, it was named <em>tmp<\/em>.<\/p>\n<p>I worked in the group from 1996 through to 2000, and from what I heard, it wasn&#8217;t until several years after I left that <em>tmp<\/em> was decommissioned.<\/p>\n<p>One of the most valuable lessons I took away is <em>name things appropriately<\/em>. The DNS server <em>tmp<\/em> was not named appropriately. Thus, the name <em>tmp<\/em> or <em>temp<\/em> should be used only for <em>transient<\/em> data or systems. (To this day I never give machines names along the lines of &#8216;tmp&#8217;; the closest I&#8217;ll go is naming them after synonyms to do with trash or garbage \u2013 meaning that I&#8217;m fully aware that at any moment they can be blown away.)<\/p>\n<p>To return to our topic, \/nsr\/tmp is <em>wrong<\/em> because it&#8217;s misnamed. Temporary files only make up some of its content. Other files, state files, can hang around between restarts of NetWorker and (particularly if NetWorker was incorrectly shutdown) give backup administrators <em>really bad days<\/em>. In fact, the &#8220;magical random&#8221; nature of \/nsr\/tmp is so well known that it&#8217;s actually started to really bug EMC engineering. My understanding is that engineering want the contents of \/nsr\/tmp captured <em>any<\/em> time an EMC support representative tells some to shutdown+delete+restart so that if it <em>does<\/em> fix the problem, they can try to debug <em>why<\/em> and remove the need.<\/p>\n<p>The problem with shutdown+delete+restart is that in doing so, you clear out other information as well. Selectively deleting &#8220;the right file&#8221; can sometimes be a bit of a needle in a hay stack operation, and I suspect that debugging these deletes post-event will either be frustratingly slow or a bit like whack-a-mole.<\/p>\n<p>Architecturally, to include both state and temporary files in the same common directory structure is silly. Having a few extra directories in the &#8216;nsr&#8217; base directory on the other hand is a minor change. I&#8217;d suggest that more improvements might be made by first actually splitting \/nsr\/tmp into:<\/p>\n<ul>\n<li>\/nsr\/lck \u2013 Resource lock files<\/li>\n<li>\/nsr\/tmp \u2013 Real temporary files (e.g., savegroup output text)<\/li>\n<li>\/nsr\/state \u2013 State files (if necessary)<\/li>\n<\/ul>\n<p>That way \/nsr\/tmp will actually start to obey the <a title=\"Principle of Least Astonishment\" href=\"http:\/\/en.wikipedia.org\/wiki\/Principle_of_least_astonishment\" target=\"_blank\">Principle of Least Astonishment<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On both Windows and Unix platforms, NetWorker maintains a &#8220;tmp&#8221; directory within nsr. This directory contains a variety of information,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_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},"jetpack_post_was_ever_published":false},"categories":[3,16],"tags":[546,938,1009],"class_list":["post-1268","post","type-post","status-publish","format-standard","hentry","category-architecture","category-networker","tag-lock","tag-state","tag-tmp"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Preston de Guise\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Data Protection Hub | All things Data Protection\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Why \/nsr\/tmp is wrong | Data Protection Hub\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2009-11-01T22:51:32+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2009-11-01T22:51:32+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Why \/nsr\/tmp is wrong | Data Protection Hub\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#article\",\"name\":\"Why \\\/nsr\\\/tmp is wrong | Data Protection Hub\",\"headline\":\"Why \\\/nsr\\\/tmp is wrong\",\"author\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Preston de Guise\"},\"datePublished\":\"2009-11-02T08:51:32+10:00\",\"dateModified\":\"2009-11-02T08:51:32+10:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#webpage\"},\"articleSection\":\"Architecture, NetWorker, lock, state, tmp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nsrd.info\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/category\\\/architecture\\\/#listItem\",\"name\":\"Architecture\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/category\\\/architecture\\\/#listItem\",\"position\":2,\"name\":\"Architecture\",\"item\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/category\\\/architecture\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#listItem\",\"name\":\"Why \\\/nsr\\\/tmp is wrong\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#listItem\",\"position\":3,\"name\":\"Why \\\/nsr\\\/tmp is wrong\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/category\\\/architecture\\\/#listItem\",\"name\":\"Architecture\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#person\",\"name\":\"Preston de Guise\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Preston de Guise\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/#author\",\"url\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/\",\"name\":\"Preston de Guise\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Preston de Guise\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#webpage\",\"url\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/\",\"name\":\"Why \\\/nsr\\\/tmp is wrong | Data Protection Hub\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2009\\\/11\\\/02\\\/why-nsrtmp-is-wrong\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/#author\"},\"datePublished\":\"2009-11-02T08:51:32+10:00\",\"dateModified\":\"2009-11-02T08:51:32+10:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/\",\"name\":\"Data Protection Hub\",\"description\":\"All things Data Protection\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Why \/nsr\/tmp is wrong | Data Protection Hub","description":"","canonical_url":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#article","name":"Why \/nsr\/tmp is wrong | Data Protection Hub","headline":"Why \/nsr\/tmp is wrong","author":{"@id":"https:\/\/nsrd.info\/blog\/author\/nsrd\/#author"},"publisher":{"@id":"https:\/\/nsrd.info\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Preston de Guise"},"datePublished":"2009-11-02T08:51:32+10:00","dateModified":"2009-11-02T08:51:32+10:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#webpage"},"isPartOf":{"@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#webpage"},"articleSection":"Architecture, NetWorker, lock, state, tmp"},{"@type":"BreadcrumbList","@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog#listItem","position":1,"name":"Home","item":"https:\/\/nsrd.info\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/category\/architecture\/#listItem","name":"Architecture"}},{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/category\/architecture\/#listItem","position":2,"name":"Architecture","item":"https:\/\/nsrd.info\/blog\/category\/architecture\/","nextItem":{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#listItem","name":"Why \/nsr\/tmp is wrong"},"previousItem":{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#listItem","position":3,"name":"Why \/nsr\/tmp is wrong","previousItem":{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/category\/architecture\/#listItem","name":"Architecture"}}]},{"@type":"Person","@id":"https:\/\/nsrd.info\/blog\/#person","name":"Preston de Guise","image":{"@type":"ImageObject","@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Preston de Guise"}},{"@type":"Person","@id":"https:\/\/nsrd.info\/blog\/author\/nsrd\/#author","url":"https:\/\/nsrd.info\/blog\/author\/nsrd\/","name":"Preston de Guise","image":{"@type":"ImageObject","@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Preston de Guise"}},{"@type":"WebPage","@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#webpage","url":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/","name":"Why \/nsr\/tmp is wrong | Data Protection Hub","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/nsrd.info\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/#breadcrumblist"},"author":{"@id":"https:\/\/nsrd.info\/blog\/author\/nsrd\/#author"},"creator":{"@id":"https:\/\/nsrd.info\/blog\/author\/nsrd\/#author"},"datePublished":"2009-11-02T08:51:32+10:00","dateModified":"2009-11-02T08:51:32+10:00"},{"@type":"WebSite","@id":"https:\/\/nsrd.info\/blog\/#website","url":"https:\/\/nsrd.info\/blog\/","name":"Data Protection Hub","description":"All things Data Protection","inLanguage":"en-US","publisher":{"@id":"https:\/\/nsrd.info\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Data Protection Hub | All things Data Protection","og:type":"article","og:title":"Why \/nsr\/tmp is wrong | Data Protection Hub","og:url":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/","article:published_time":"2009-11-01T22:51:32+00:00","article:modified_time":"2009-11-01T22:51:32+00:00","twitter:card":"summary","twitter:title":"Why \/nsr\/tmp is wrong | Data Protection Hub"},"aioseo_meta_data":{"post_id":"1268","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-21 05:18:31","updated":"2025-07-20 04:32:34","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/nsrd.info\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/nsrd.info\/blog\/category\/architecture\/\" title=\"Architecture\">Architecture<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tWhy \/nsr\/tmp is wrong\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/nsrd.info\/blog"},{"label":"Architecture","link":"https:\/\/nsrd.info\/blog\/category\/architecture\/"},{"label":"Why \/nsr\/tmp is wrong","link":"https:\/\/nsrd.info\/blog\/2009\/11\/02\/why-nsrtmp-is-wrong\/"}],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-ks","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/1268","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=1268"}],"version-history":[{"count":0,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/1268\/revisions"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=1268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=1268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=1268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}