Migrating or copying files to another server and retaining the permissions is a common task when migrating a file server.
If all permissions are successfully retained it will make the migration seamless and nobody will ever notice that a migration has taken place.
If there are shared folders and with different permissions, re-sharing the folder by scratch is just time consuming and giving access denied to users will be inevitable.
But how to copy files and folders, like it was exactly done on the old server?
In Windows environment, just 3 steps are needed. 3 steps sound easy and quick.
Steps below will work for NTFS permissions and folder access rights solely depends on it.
a. Copy the files to the new server and retaining its permissions while files and folders are being copied
b. Export the shares registry (old server)
c. Import the shares registry (new server)
The link below from Microsoft website shows how xcopy can copy folder and retain the permissions.
Copy folder and retain permissions:
At command prompt:
Type: xcopy source destination /O /X /E /H /K
Type: xcopy c:\olddocs c:\newdocs /O /X /E /H /K, and then press ENTER, where olddocs is the source folder and newdocs is the destination folder.
Xcopy switches have the following effects:
/E - Copies folders and subfolders, including empty ones.
/H - Copies hidden and system files also.
/K - Copies attributes. Typically, Xcopy resets read-only attributes.
/O - Copies file ownership and ACL information.
/X - Copies file audit settings (implies /O).
Aside from Xcopy, robocopy will come in handy to copy files and folders and retaining the permissions.
robocopy “source address” “destination address” *.* /mir /sec /log:migrate.log
Technet link below shows how to export the share registry:
To be done on the old server:
reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares shareperms.reg
To be done on the new server:
reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares shareperms.reg
After importing the registry, restart the server and check whether folders are shared or not. If everything goes well, shared folders will automatically appear and it will be ready for everyone to access.
To successfully migrate and automatically share the folder exactly as it was on the old server, drive letter and parent folder name should be the same or else it won’t match the imported registry settings.
Free Android Apps:
Heaven's Dew Fall Prayer app for Android :
Catholic Rosary Guide for Android: