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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restoring databases to a new server 1

Status
Not open for further replies.

mattohope

Technical User
Mar 12, 2005
8
0
0
GB
Hi,

I'm a complete newbie to sharepoint, and have been tasked with creating a DR plan for our shrepoint server.

this is the situation, i have a backup of both the config and contents database and i want to restore them to a new server running sharepoint and therefore recover the origional sharepoint site, how can i do this?

 
Backup and Restore is not the prettiest thing in Sharepoint. I uses Sharepoint Portal Server so if you re only using WSS this part wont help. I have a scheduled task that runs this bat file:

D:
cd Program Files\Sharepoint Portal Server\Bin\
spsbackup.exe /all /file "D:\Backup\SPSbackup" /overwrite

This backs up the entire portal (all its dbs) to the specified location. Then my normal backup picks up these files and writes them to tape.

Then on a different server with sharepoint installed, you can copy or restore these files to it or map a drive to them. Using the spsbackup and restore tool click the restore tab, browse to the xml file and away you go.

I also backup my sites seperatley with another vbs script:

Option Explicit
Const STSADM_PATH = _
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN\stsadm"
Dim objFso, objFolder, objFiles, objFile, objShell, objExec, strResult, objXml, objSc, objUrl, strUrl, strFileName, strCmd
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFso.GetFolder("D:\backup\")
Set objFiles = objFolder.Files
WScript.Echo "Begin backup"
' Delete all backup files currently present in the backup folder.
For Each objFile in objFiles
objFile.Delete(True)
Next
' Retrieves all site collections in XML format.
Set objShell = CreateObject("WScript.Shell")
Set objExec = objShell.Exec(STSADM_PATH & " -o enumsites -url strResult = objExec.StdOut.ReadAll
WScript.Echo strResult
' Load XML in DOM document so it can be processed.
Set objXml = CreateObject("MSXML2.DOMDocument")
objXml.LoadXML(strResult)
' Loop through each site collection and call stsadm.exe to make a backup.
For Each objSc in objXml.DocumentElement.ChildNodes
strUrl = objSc.Attributes.GetNamedItem("Url").Text
strFileName = "D:\backup\" & Replace(Replace(strUrl, " ""), "/", "_") & ".bak"
strCmd = STSADM_PATH & " -o backup -url """ + strUrl + """ -filename """ + strFileName + """"
WScript.Echo "Backing up site collection " & strUrl & " to file _" & strFileName & " using the following command " & strCmd
objShell.Exec(strCmd)
Next
WScript.Echo "Backup of portal site collections successful"

This dynamically backsup all sites but I'm not sure if it works without Sharepoint Portal. Then you can use stsadmn to restore an individual site. (Thanks to whoever I got this script from, may of been someone here cant remember)

We are also about to implement commvault because the way I just described takes to long to restore an individual item. DocAve also does item, site and portal restores.
 
Hi,

Sorry about not getting back to you, been VERY busy for the last few months.

Got this to work in the end, took the SQL backup file we were already creating of the live content database and moved it onto the new DR server.

Then setup the sharepoint site again on the new server, except i didn't apply a scheme.

Restored backup database over the new content database on the DR server, then detached it and re-attached it from sharepoint.

This re-creates the site, finally re-applied indexing to re-create the search index.

All done, complete duplicate of the origional
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top