Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy file shares to another server 1

Status
Not open for further replies.

bnsmhe

Technical User
Jul 14, 2004
41
BE
I think it's not possible,bt maybe there is a way around.
I'm installing a new W2K server to replace te old one. There are a lot of file shares on the old one. Is there a way, when I copy al the data, that I also copy the share name? The new server will have the samen name and IP after copying all the data.

tnx

*************************
MCSA/MCSE 2000, MCSA 2003
 
Moving the actual files and directories is simple, however share information is not contained in the directories, but rather is contained in the registry (under LanmanServer), it is therefore necessary to copy this registry information from the machine currently containing the shares, to the machine that will host the shares:

To copy the files you will need to use the SCOPY utility that is supplied with the resource kit to keep the current permission/audit settings
SCOPY <current>:\<dir> <new>:\<dir> /o /a /s
On the machine that currently hosts the shares, start the registry editor (regedt32.exe, not regedit.exe)
Move to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
Click on Shares, and select Save Key from the Registry Menu
Enter the name of a file, e.g. shares.reg and click OK
Copy this file to the target machine
Again start the registry editor (regedt32.exe) and move to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares and select Shares.
From the Registry menu, select Restore and select the file you saved, e.g. shares.reg and click Open
Warning: You will lose all currently configured shares on the machine
You will prompted to continue, click Yes
Close the registry editor
Reboot the machine and once restarted you will see the new shares


Aslam
 
Ok for the export. BUT, I need to change de path of some shares because the new server will only have 2 partitions instead of 3 (like the old server). So I need to edit the reg file. I tried it but de reg file is in hex. Is there a tool to edit these files so I can edit the file??

*************************
MCSA/MCSE 2000, MCSA 2003
 
If you open the registry key with regedt32, you should be able to view and modify the pathname of a share when you double click the key.
The exported shares are added to the new Windows 2000 system, and the existing shares remain. But make sure the new system doesn't contain a sharename that also exists on the old installation. (otherwise first rename this share before you import the new ones)
After that restart the server service, reboot isn't necessary.

With the xcopy command you can also copy security rights and authiting (xcopy /O /X)
Use xcopy /? to see all the parameters.
As far as I know scopy is a Windows NT command and not supported by w2k.

Good luck!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top