{"id":75,"date":"2008-09-01T03:39:40","date_gmt":"2008-09-01T08:39:40","guid":{"rendered":"http:\/\/yourlinuxguy.com\/?p=75"},"modified":"2008-11-19T11:43:10","modified_gmt":"2008-11-19T16:43:10","slug":"how-can-i-migrate-or-back-up-trustees-from-an-oes2-linux-ext3ncp-volume","status":"publish","type":"post","link":"https:\/\/yourLinuxGuy.com\/?p=75","title":{"rendered":"How can I migrate\/export (or back up) trustees from an OES2 Linux ext3\/ncp volume?"},"content":{"rendered":"<p>This question came to me from Steve:<\/p>\n<p><em>&#8220;&#8230;I am looking to migrate my data from an NSS\/NCP volume to an ext3\/NCP volume (temporarily) and then back to a ext3\/NCP volume. Should I do it? I have a vendor software that needs me to run on an EXT3 partition.&#8221;<\/em><\/p>\n<p>The important part is that by &#8220;NCP&#8221;, he means *with trustees*. Steve and I now know that this is not possible with the tools that Novell provides for you.<\/p>\n<p>Oh sure, you can use the OES2 built-in &#8220;Migrate NetWare Files&#8221; tool (in Yast) to migrate the data and trustees *from* the NSS-based source server *to* the NCP-only (non-NSS) server. You just can&#8217;t get the data &amp; trustees off the NCP-only (non-NSS) server. Nope. No tools. No dice.<\/p>\n<p>So imagine this scenario: you migrated the data off the NSS\/NCP volume to a temp OES2 server&#8217;s ext3\/NCP (non-NSS) volume, using the &#8220;Migrate NetWare Files&#8221; (migfiles) tool, and all went well. You test all trustee assignments, data, etc., and everything is fine. Now, you destroy the original source NSS volume and build the new destination ext3\/NCP volume, and you are ready to migrate back.<\/p>\n<p>First, you try the same &#8220;Migrate NetWare Files&#8221; tool, and you just get errors. Hmm. You dig deep and find that it seems to be looking for elments of NSS&#8230; but there was no mention that NSS was mandatory&#8230; Hmm&#8230;<\/p>\n<p>You then try nbackup, but guess what? It makes calls to NSS elements too. Nbackup *might* have worked if we had used it in the first place to make a blob from the NSS\/NCP volume and restore to the ext3\/NCP volume (import of trustees is not the problem, export is), but that doesn&#8217;t matter now&#8230;<\/p>\n<p>You find a dude out on the &#8216;net who wrote a <a title=\"trestore.sh\" href=\"http:\/\/www.novell.com\/coolsolutions\/tools\/18952.html\" target=\"_blank\">modern equivalent of the old &#8220;tbackup&#8221; utility<\/a>, but for OES Linux &#8212; and it is very nice &#8212; but it uses NSS calls as well&#8230;<\/p>\n<p>Even the &#8220;rights&#8221; package and commands are part of the NSS sub-system, which you can&#8217;t use since you don&#8217;t have the NSS elements installed anymore on your production server (since they aren&#8217;t needed without NSS in an ext3\/NCP situation). They wouldn&#8217;t work against an non-NSS volume anyway, even if they were there.<\/p>\n<p>Okay, data you can copy. That&#8217;s not the problem. You hastily configure an rsync daemon on one side, a client on the other, and start the data copy going right away, just to get that done with.<\/p>\n<p>You still need those pesky trustee assignments. So, what are you left with? You have a trustee database file (._NETWARE\/.trustee_database.xml at the root of your volume), and ncpcon. You can: (A1.) visually inspect the xml database file and (A2a.) start clicking like mad in Windows Explorer to re-add all the trustee assignments back or (A2b.) type in a zillion &#8220;ncpcon rights add&#8221; commands. Or&#8230; you can: (B.) script it.<\/p>\n<p>Okay, end of scenario. What would you do? Really? Well, what if you don&#8217;t have enough time to script it (because it is kinda&#8217; complex), and it&#8217;s almost morning and the users are going to want to log in a few hours?? I&#8217;m not going to say what we ended up doing, but I can tell you this: I have now written a script to solve this problem so that I will never be faced with that crap again.<\/p>\n<p>On a side note, I felt quite let down by Novell support when we called in on this too. I won&#8217;t go into specifics about this in public, but it sure wasn&#8217;t like the old days&#8230; and it hurts&#8230;<\/p>\n<p>Anyway, here&#8217;s the deal: If you have arrived at this blog page because you *are* in such a scenario and did a search, or because you might be in the near future&#8230; or even if you are a regular reader&#8230; consider yourself warned. The benefit of this post is really the warning of these shortcomings, since it is a very real situation that many people may find themselves in.<\/p>\n<p>And if you are interested in having someone like&#8230; oh, say&#8230; ME&#8230; parse your trustee database and instantly turn it into a import script to restore all your trustee assignments, please <a title=\"Contact Me\" href=\"http:\/\/yourlinuxguy.com\/?page_id=7\" target=\"_blank\">contact me<\/a> and I would love to offer you my consulting services! Sorry to be so cheesy about it folks, but I could always use the work&#8230; \ud83d\ude09<\/p>\n<p>Actually, if you send me your trustee database file, I might just parse it and return the results for free&#8230; if you&#8217;re nice&#8230;\u00a0 \ud83d\ude09\u00a0 The result file is VERY handy for Disaster Recovery. Or, if you happen to be using a non-SMS-aware backup like RSync, and you aren&#8217;t backing up your trustee assignments, but do get the database as part of the backup, this would be handy for you as well. Or if you&#8217;re migrating to another server&#8230; or if you just want a nice file for an audit trail&#8230; bla bla bla&#8230;.<\/p>\n<p>I just hope that my telling this story helps somebody else avoid the pain I went through&#8230;<\/p>\n<p>\ud83d\ude42<\/p>\n<p><span style=\"color: #808080;\">** Note: The script handles IRMs, too&#8230;And right now a cgi-based version of this tool is in the works for your convenience&#8230; stay tuned&#8230;<\/span><\/p>\n<p>POST-PUBLISH UPDATE: I have turned the tool into a cgi interface that anyone can try. So please notice the link to &#8220;<a title=\"Trustee DB Export (alpha)\" href=\"..\/?page_id=86\">Trustee DB Export (alpha)<\/a>&#8221; under the &#8220;Pages&#8221; section to the right (on the main front page). Give it a try!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This question came to me from Steve: &#8220;&#8230;I am looking to migrate my data from an NSS\/NCP volume to an ext3\/NCP volume (temporarily) and then back to a ext3\/NCP volume. Should I do it? I have a vendor software that&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/yourLinuxGuy.com\/?p=75\">Read more<\/a><\/p>\n","protected":false},"author":5,"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":""},"categories":[11,57,13],"tags":[],"class_list":["post-75","post","type-post","status-publish","format-standard","hentry","category-intermediate","category-ncpcon","category-oeslinux"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pnjn1-1d","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=75"}],"version-history":[{"count":10,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":152,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=\/wp\/v2\/posts\/75\/revisions\/152"}],"wp:attachment":[{"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yourLinuxGuy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}