Dean Maher

Hi

I'm new to Sharepoint Services and I'm now trying to find information on how to setup a schedule backup for my Sharepoint Service V3 . At present I'm manually using utility within SharePoint 3.0 Central Administration.

Back ground I've have Windows 2003 Server R2 on a 64bit OS. I have default version on Microsoft SQL server install, Which I beleive is the Express.


I've read articles describing using using STSADM within command in a BAT or CMD file to backup Sharepoint and use Task scheduler. I've also read that I can use Microsoft SQL server manager 2005 Express.


Question
If I want to backup all information on a Sharepoint Service Server, Which way is the best way Is there any documentation out there showing me how to do this Can I use Microsoft SQL server manager 2005 Express to connect to Sharepoint Service Databases Is there another way to schedule backups

Any Help Would be Great

Thanks












Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help


Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Dean Maher

Thanks...... I've setup an automated backup using stsadm.exe within an *.VDS Script. I scheduled a tasks to run the script daily. But as I have noticed that after
running script it backup all my current sites. AS one large file name <Site_name>.bak. If I compare in to when I manually backup all my Database IE( Content, Search, Administration) using the Utility within SharePoint 3.0 Central Administration the Files are different. There are a lot more smaller size files!

I'm confused if my server did crash today can I recover all my sites and and Sharepoint Service Server setting with the STSADM or the backup DATADASE approach.

Dean






Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

dns-tommy

I have never gotten SharePoint to restore with the restore functionality inside of Central Admin. When I talked to MS they said they DO NOT offer config level restores. This to me somewhat makes the restore inside of Central Admin to very functional. I backup all of my DB's, note the names of my applications and the corrisponding content databases. Then I reinstall SharePoint, recreate the applications and restore the SSP(s). I have done and tested it a few times. It works perfectly.



Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Dean Maher

Thanks DNS_Tommy! When you backup your DB's , what are you using, Central Admin or another utility. I've tried you use Microsoft SQL 2005 Express manager 2005 edition. But Whenever I try to connect I get the following error.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)

I'm running this manager on my sharepoint Service box
Using the database name as <Server>\Microsoft##SSEE

Any Idea Is there another Utility to backup my databases









Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Prash1

Enable the remote connections in the sql server surface manager. Even after that if you have problems, check the firewall. Create exceptions in the firewall to allow sql server connections.

Thanks,

Prashanth





Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Dean Maher

Thanks Prashanth

When I first came cross this issue I followed the direction in this document


How to configure SQL Server 2005 to allow remote connections

http://support.microsoft.com/kb/914277

But when you install Microsoft SQL Server 2005 Embedded Edition (Default install of Sharepoint Service V3 ) you don't get the GUI installed nor the utility under services. As I'm running the manager on the server , I can't see it being an firewall issue but just in case I did make an exception for SQL Server.exe. Still the same error. Does anyone know how to enable remote connections with Microsoft SQL Server 2005 Embedded Edition which get installed with WSS 3

Any help would be great
Dean





Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Curtis Ruppe

Hey Dean,

First, the bad news. I have enabled remote connections in the past with the Embedded Edition, and it seems to be blocked internally. Traditionally the SharePoint database is not meant to be managed directly via SQL, and it would not surprise me if Microsoft declaritively blocked access to it. SQL Management Studio Express cannot connect to the database directly on the same box either.

The good news. stsadm -o backup does a full backup per site collection. Assuming you have few site collections and little configuration to backup, this will probably be fine by itself. Beyond the database, make sure you also backup any customizations done (through the 12 hive), as well as your Application Pool, and Web Site configurations (via the IIS, Save Configuration to file option). Hope this helps!





Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

bbuhac

Hi there

Check this out: http://www.mcpblog.net/Lists/Posts/Post.aspx ID=10






Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Evaldo Santos

Hi Dean,

I guess we¨re desiring the same thing and facing the same problem.

My wish goes a little further... i created a folder structure to write my sharepoint backups. Something like this:

Year --- Month --- Last Friday. Cause a i backup every friday. The last backup of the month i write to an external medium.

I tried to use a script that i read in the book of Mark E. Grew (creating client extranets with SharePoint 2003). and it sounds like this:

*************************************

' Back up the WSS sites...

' !!!!!!!!!!!!!!!-

Const STSADM_PATH = _

"C:\Program Files\Common Files\Microsoft Shared\" & _

"web server extensions\60\BIN\stsadm"

Dim objFso, objFolder, objFiles, objFile, objShell, objExec

Dim strResult, objXml, objSc, objUrl, strUrl

Dim strFileName, strCmd

Set objFso = CreateObject("Scripting.FileSystemObject")

' Delete all backup files currently present in the backup folder.

Set objFolder = objFso.GetFolder("\\extwss01\WSSBackups\")

Set objFiles = objFolder.Files

For Each objFile in objFiles

objFile.Delete(True)

Next

' Retrieve all site collections in XML format.

Set objShell = CreateObject("WScript.Shell")

Set objExec = objShell.Exec(STSADM_PATH & " -o enumsites -url http://extwss01/")

strResult = objExec.StdOut.ReadAll

' 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 = "\\extwss01\WSSBackups\" & _

Replace(Replace(strUrl, "http://", ""), "/", "_") & _

".bak"

strCmd = STSADM_PATH & " -o backup -url """ + strUrl & _

+ """ -filename """ + strFileName + """"

objShell.Exec(strCmd)

Next

WScript.Echo "WSS Backup complete."

*************************************************************

What i do not know is wich strings or commands exactly do i have to change to make it work within my domain. Off course i changed the servername and backfolder.

But the scripts runs and i dont get the result i expected. if it works i can setup or schedule multiple tasks to write the backups in the wright folder according to my backup schema (using the same script wiht different backup locations).

Can somebody please help us out here

Already thanks for reading!

Evaldo Santos






Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Curtis Ruppe

I'm hoping you are referrign to WSS 2.0 backup, instead of WSS 3.0 backup. Here is an updated script:

Code Snippet

' Back up the WSS sites...

' !!!!!!!!!!!!!!!-

Const STSADM_PATH = _

"C:\Program Files\Common Files\Microsoft Shared\" & _

"web server extensions\60\BIN\stsadm"

Const BACKUP_DIR = "E:\WSSBackups\"

Const SHAREPOINT_URL = "http://extwss01/"

Dim strBackupFolder

strBackupFolder = BACKUP_DIR & CStr(Year(Now())) & "\" & _

CStr(Month(Now())) & "\" & CStr(Day(Now()))

Dim objFso, objFolder, objFiles, objFile, objShell, objExec

Dim strResult, objXml, objSc, objUrl, strUrl

Dim strFileName, strCmd

Set objFso = CreateObject("Scripting.FileSystemObject")

' Delete all backup files currently present in the backup folder.

If objFso.FolderExists(strBackupFolder) Then

Set objFolder = objFso.GetFolder(strBackupFolder)

Set objFiles = objFolder.Files

For Each objFile in objFiles

objFile.Delete(True)

Next

Else

CreateBackupFolder strBackupFolder, objFso

End If

' Retrieve all site collections in XML format.

Set objShell = CreateObject("WScript.Shell")

Set objExec = objShell.Exec(STSADM_PATH & " -o enumsites -url " & SHAREPOINT_URL)

strResult = objExec.StdOut.ReadAll

' 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 = strBackupFolder & "\" & _

Replace(Replace(strUrl, "http://", ""), "/", "_") & _

".spb"

strCmd = STSADM_PATH & " -o backup -url """ + strUrl & _

+ """ -filename """ + strFileName + """"

objShell.Exec(strCmd)

Next

WScript.Echo "WSS Backup complete."

Sub CreateBackupFolder(strFolderName, fs)

'This subroutine creates the appropriate folder structure
' if it does not already exist

If Left(strFolderName, 2) = "\\" Then
folderparts = Split(strFolderName, "\")
strCurrent = "\\" & folderparts(2) & "\" & _
folderparts(3) & "\"
folderparts = Split(Right(strFolderName, Len(strFolderName) - _
Len(strCurrent)), "\")
Else
folderparts = Split(strFolderName, "\")
strCurrent = folderparts(0) & "\"
folderparts = Split(Right(strFolderName, Len(strFolderName) - _
Len(strCurrent)), "\")
End If
For Each folderpart In folderparts
strCurrent = strCurrent & "\" & folderpart
If Not fs.FolderExists(strCurrent) Then
fs.CreateFolder strCurrent
End If
Next
End Sub

For those of you who do not know coding that well, you can change the following parameters to get this to work:

  • BACKUP_DIR - your appropriate backup location (which can be \\SERVERNAME\SHARENAME as well).
  • STSADM - change the 60 to 12 if you are using WSS 3.0 instead
  • strBackupFolder - update the code to use any other backup folder scheme you want.

I did not understand the --> Last Friday portion, but hopefully this will be enough to get you rolling. Good luck!





Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Trouble3

Right, so how/where exactly would I run this script.

Do I have to set some permisions...

etc.





Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Curtis Ruppe

You run that script using the at or Scheduled Tasks console on the WSS / MOSS server.



Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Evaldo Santos

"Scheduled Tasks console on the WSS '

Where can u exactly found the scheduled tasks In the WSS 3.0 Central Administration (Operatios or Application Management

Thanks Anyway.

Evaldo Santos






Re: SharePoint - Setup, Upgrade, Administration and Operation Sharepoint Service V3 schedule backup Help

Curtis Ruppe (MicroStaff IT)

Use Start -> Control Panel -> Scheduled Tasks