Jump to content

Upgrade File/Print Server


WildKat
 Share

Recommended Posts

We have a new file/print server running windows 2003 and we want to migrate all the data from an old file/print server (also running windows 2003). Users currently have the old server mapped as home directory and use offline files and network printers as well. How can I seamlessly migrate everything with little or no impact to any user? Is there a way to forward all requests to the new server or rename the new server to the same as the old or use a specialist tool etc etc to do this??

Link to comment
Share on other sites


We had done the same thing here last week. we used the print migrater to get all of the printers off of one server and use it again on the new system.

The file share are a little different. First what you need to do is do a robocopy of all of your old data to your new server. Once it is synced up, disjoin the server from the domain and change the name. Join it back to the domain and do the robocopy again so all files that were in use are no longer in use and no user will connect to it again while you are trying to do this. Next add in a DNS record for the old server's name to the new server. This way DFS will still work and anyone using the old printserver/fileserver will be able to still use there shortcuts and network mappings.

Shares were the tricky part. We used Hyena to pull out Sharename, Sharepath, Description, Type of share into a CVS document. Then pulled out all of the default system shares so none of the shares are the same. After that i wrote a script that will create the shares:

This was ran from DOS as cscript

'Define Constants and Global Variables
Const FILE_SHARE = 0
Const MAXIMUM_CONNECTIONS = Null
Const ForReading = 1
Const TristateTrue = -1
strComputer = "SERVER NAME"

'Instantiate WMI objects to create shares
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewShare = objWMIService.Get("Win32_Share")

'Instantiate File System Object and open input file
Set objFSO = CreateObject("Scripting.FileSystemObject")
'add the path where your txt document is at
Set objTextFile = objFSO.OpenTextFile ("D:\Migration\Users-Standard.txt", ForReading, False, TristateTrue)

'Loop through input file
Do Until objTextFile.AtEndOfStream
CreateShare(objTextFile.Readline)
Loop

'arrShares(0) = share name
'arrShares(1) = share path
'arrShares(2) = Description
'arrShares(3) = type of share

Sub CreateShare(txtLine)
arrShares = Split(txtLine, ",")
Wscript.Echo """" & arrShares(1) & """" &","& arrShares(0) &","& arrShares(3) &","& MAXIMUM_CONNECTIONS &","& arrShares(2)
errReturn = objNewShare.Create (arrShares(1), arrShares(0), arrShares(3), MAXIMUM_CONNECTIONS, arrShares(2))
'Wscript.Echo errReturn
End Sub

Here is a sample of the txt file we used to create the shares:

NAME1$,G:\Users\Standard\NAME1,,0
NAME2$,G:\Users\Standard\NAME2,,0

Robocopy

What i did was create a batch file with all of the robocopy commands. We are taking down 3 file servers into 1 with a single drive. Each server had 2 drives on it. So i just set a schedule task to run this robocopy nightly just to make sure we get all of the data until we are ready.

sample:

robocopy.exe "\\Sourceserver\f$" "\\Destserver\f$\Sourceserver_FDrive" /S /E /ZB /COPYALL /R:2 /W:5 /PURGE /XD \\Sourceserver\F$\DFSROOT\ /log:C:\robocopy\sourceserver-f.log

Robocopy.exe [source location] [dest location]

/S - Copy subfolders

/E - Copy subs including empty

/Z - copy files in restartable mode (survive network glitch).

/B - copy files in Backup mode.

/COPYALL - copy all file info

/R:2 - 2 retries

/W:5 - Wait 5seconds between tries

/PURGE - delete dest files/folders that no longer exist in source.

/XD \\[source server & location] - Do not copy a selected folder. I did this because DFSROOT would not copy and error out. It would take HOURS to sync that with the /r & /w

/log [location] - output a log to see what failed and what copied.

Hope that helps some. Good luck :P

Link to comment
Share on other sites

Thats some great help there, thanks. Im sure itll be useful for me as well as many others! Good stuff!

glad it can help :D I am just learning all of this too. We are migrating 10 file servers into 3 servers. I will post if i learn anything else that is useful.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...