Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > File Systems > Migrating a 2003 file server to 2008

Reply
Thread Tools Display Modes

Migrating a 2003 file server to 2008

 
 
ktm99
Guest
Posts: n/a

 
      09-16-2008

When i restore the folders from backup to a 2008 server the share on each
folder is not maintained. I am using symantec 11d for backup. is this a
server 2008 issue? I can reshare the folder and it works, but i have 500 to
do.
 
Reply With Quote
 
 
 
 
moi
Guest
Posts: n/a

 
      09-17-2008
Hi ktm99,

share informarion is stored in the registry on the old server so restore to
different location won't include share info.

If you still have the old server see the listing below for a scripted
(mostly) method of doing this via the Resource kit rmtshare utility.

PC


"ktm99" <> wrote in message
newsF8A3722-760F-44CB-B225-...
> When i restore the folders from backup to a 2008 server the share on each
> folder is not maintained. I am using symantec 11d for backup. is this a
> server 2008 issue? I can reshare the folder and it works, but i have 500
> to
> do.


Replicate Shares and Share Permissions
----------------------------------------------

1) Use rmtshare to list all shares on MyOldServer

Rmtshare \\MyOldserver > MyOldserverShares.txt

2) Import to excel and edit to produce just a list of sharenames with
unneeded admin and defaults (e$, etc) removed.

3) List properties and permissions using 2 scripts
[Listall.cmd]

for /f %%i in (MyOldserverShares.txt) do call listshare.cmd %%i >>
MyOldserverSharesdetl.txt
[Listshare.cmd]

rmtshare \\MyOldServer\%1

4) Use vbscript BuildShares.vbs (listing at end) to parse
MyOldserverSharesdetl.txt and produce a script to run rmtshare
to create shares and set permissions on newserver - CrtNewShares.cmd

Sample Output:

rmtshare \\MyNewServer\Prof-HR-NZ$=g:\Prof-HR-NZ /GRANT "DOM\Domain
Admins":F /GRANT DOM\HR-Prof:c /GRANT DOM\HR-StaffG:C /GRANT
ADM\Prof-HR-NZ:R /remove everyone


5) Edit new cmd file CrtNewShares.cmd and replace all 'MyOldServer' with
'MyNewServer', check drive letter is correct, etc.

6) Copy cmd file to MyNewServer and execute

CrtNewShares > CrtNewShares.log


=========================================
rem BuildShares.vbs
rem Build a Script to recreate shares on a new server
rem by parsing rmtshare output
rem P.C 06/10/05
rem -------------------------------------------------------------------


Dim fs
Dim fso
Dim strTargetFile
Dim strVersionReqd
Dim strVersionFnd
Dim OutFile
Dim Infile
Dim textstream
Dim strMachine
Dim strDay
Dim strMon
Dim strYr
Dim strMIn
Dim strHR

strDay = Day(Now)
strMon = Month(Now)
strYr = Year(Now)
strMin = Minute(Now)
strHour = Hour(Now)
strSec = Second(Now)

'''wscript.echo strTargetFile
Set fs=CreateObject("Scripting.FileSystemObject")
Set objShell=CreateObject("Wscript.Shell")

Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0

set Infile = FS.GetFile("MyOldServerSharesdetl.txt")
Set OutFile = fs.CreateTextFile("CrtShares.cmd")
''wscript.echo strTmp

On Error GoTo 0

''''wscript.echo strTmp

'Set Outfile = fso.OpenTextFile(PatchCheckLog.txt, ForWriting, True)
Set TextStream = Infile.OpenAsTextStream(ForReading, TristateUseDefault)

' Read the file line by line
Do While Not TextStream.AtEndOfStream
strCmd = TextStream.readline
x = InStr(strCmd, "Share name")
If x Then
strCmd = Trim(Mid(StrCmd, 19))
strOutput = "rmtshare " & strCmd
End If
x = InStr(strCmd, "Path")
If x Then
strOutput = strOutput & "="& Trim(Mid(strCmd,19))
strMkdir = Trim(Mid(strCmd,19))
y = instr(strMkdir,":")
strMkdir = "mkdir \\MyNewServer\" &
left(strMkdir,1) & "$" & mid(strMkdir,y+1)
End If
x = InStr(strCmd,"ADM\")
If x Then
y = InStr(strCmd,":")
strLeft = Trim(Left(strCmd,y-1))

strRight = Trim(Mid(strCmd,y+2))
If strRight="FULL CONTROL" Then
strRight="F"
End If
If strRight="CHANGE" Then
strRight="C"
End If
If strRight="READ" Then
strRight="R"
End If

If strLeft="DOM\Domain Admins" Then
strOutput = strOutput & " /GRANT " & Chr(34) & strLeft & Chr(34) &
":" & strRight
Else
strOutput = strOutput & " /GRANT " & strLeft & ":" & strRight
End If
End If

If InStr(strCmd,"The command") Then
strOutput = strOutput & " /remove everyone"
outfile.writeline strMkdir
outfile.writeline strOutput

End If
Loop
Set TextStream = nothing

OutFile.Close
WSCRIPT.QUIT




 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Migrating Server 2003 DC/Exchange to server 2008 Meinolf Weber [MVP-DS] Server Migration 0 07-16-2009 11:05 AM
Re: Migrating Server 2003 DC/Exchange to server 2008 Meinolf Weber [MVP-DS] Server Migration 0 07-10-2009 06:21 AM
Re: Issues migrating SBS 2003 domain to Server 2008 Standard Cris Hanna [SBS MVP] Windows Small Business Server 0 11-30-2008 09:31 PM
Re: Issues migrating SBS 2003 domain to Server 2008 Standard Frank McCallister SBS MVP Windows Small Business Server 0 11-30-2008 09:11 PM
Migrating from SBS 2003 to Server 2008 and Exchange 2007 Paul Server Migration 5 09-11-2008 09:30 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59