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
news

F8A3722-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