{"id":1888,"date":"2014-12-08T11:07:00","date_gmt":"2014-12-08T11:07:00","guid":{"rendered":"http:\/\/www.edwardsd.co.uk\/work\/?p=1888"},"modified":"2015-05-03T16:13:56","modified_gmt":"2015-05-03T15:13:56","slug":"backup-ntfs-permissions-icacls-subinacl","status":"publish","type":"post","link":"https:\/\/www.edwardsd.co.uk\/work\/2014\/12\/backup-ntfs-permissions-icacls-subinacl\/","title":{"rendered":"Backup NTFS Permissions | iCACLS | SubINACL"},"content":{"rendered":"<hr \/>\n<p><strong>iCACLS <\/strong><\/p>\n<p><strong>Backup NTFS permissions:<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">icacls D:\\MyDirectory \/save \\\\server\\Backup\\%computername%_iCACLS_NTFS.txt \/t \/c<\/pre>\n<p><strong>Restore NTFS permissions:<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">icacls D:\\MyDirectory \/save \\\\server\\Backup\\%computername%_iCACLS_NTFS.txt \/t \/c<\/pre>\n<hr \/>\n<p><strong>SubINACL<!--more--><\/strong><\/p>\n<p><strong>Download here: <a title=\"SubInACL (SubInACL.exe)\" href=\"http:\/\/www.microsoft.com\/en-gb\/download\/details.aspx?id=23510\" target=\"_blank\">SUBINACL<\/a>\u00a0<\/strong><\/p>\n<p>SUBINACL is not supported on WS2008R2\/2012 but I&#8217;ve not heard any compatibility issues.<\/p>\n<p><strong>Backup NTFS permissions (with log file):<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">subinacl \/noverbose \/OUTPUTLOG=\\\\server\\Backup\\%computername%_subinacl_log.txt\u00a0\/output=\\\\server\\Backup\\%computername%_subinacl_NTFS.txt \/subdirectories\u00a0D:\\MyDirectory<\/pre>\n<p>&lt;strong&gt;Restore NTFS permissions:&lt;\/strong&gt;<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">subinacl \/playfile\u00a0\\\\server\\Backup\\Server1_subinacl_NTFS.txt<\/pre>\n<p><strong>Note:<\/strong> If you backup the entire directory i.e. &#8220;D:\\&#8221; then you will not be able to easily restore individual subfolders. I.E. &#8220;D:\\Marketing&#8221; the best option is to run this for every sub-folder you wish to backup, not ideal but will save time if you need to carryout a restore.<\/p>\n<p><strong>Change Permissions from old to new domain accounts:<\/strong><\/p>\n<p>Use &#8220;\/testmode&#8221; to generate a log file and check the changes are correct:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">subinacl \/testmode \/OUTPUTLOG=C:\\PermissionChangesLog.txt D:\\Company\\Shares\\*.* \/changedomain=OLDDomain=NEWDomain<\/pre>\n<p>Then remove &#8220;\/testmode&#8221; to make the changes:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">subinacl \/OUTPUTLOG=C:\\PermissionChangesLog.txt D:\\Company\\Shares\\*.* \/changedomain=OLDDomain=NEWDomain<\/pre>\n<p><strong>Note:<\/strong> Trust relationship must be\u00a0in-place\u00a0for OldDomain to\u00a0look-up\u00a0the users in NewDomain.<\/p>\n<p><strong>Change Permissions from old to new domain accounts using mapping file:<\/strong><\/p>\n<p>If the users in the old domain have different usernames in the new domain then you will need to use a mapping file to let SUBINACL know what account it\u00a0corresponds\u00a0to. This is a basic text file in the same directory as the SUBINACL tool.<\/p>\n<p><strong>Reg Export:<\/strong><\/p>\n<p><strong>Backup shares listed on server:<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">reg export HKLM\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Shares \\\\server\\Backup\\%computername%_Shares.reg<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>iCACLS Backup NTFS permissions: icacls D:\\MyDirectory \/save \\\\server\\Backup\\%computername%_iCACLS_NTFS.txt \/t \/c Restore NTFS permissions: icacls D:\\MyDirectory \/save \\\\server\\Backup\\%computername%_iCACLS_NTFS.txt \/t \/c SubINACL<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"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":[6,21],"tags":[],"class_list":["post-1888","post","type-post","status-publish","format-standard","hentry","category-bat","category-code"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pOPt8-us","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/posts\/1888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/comments?post=1888"}],"version-history":[{"count":7,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/posts\/1888\/revisions"}],"predecessor-version":[{"id":2865,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/posts\/1888\/revisions\/2865"}],"wp:attachment":[{"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/media?parent=1888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/categories?post=1888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/tags?post=1888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}