SPSFAQ
SharePoint Server Frequently Asked Questions
affiliate links


Buy a sponsored link

You could have a link to your website on every page of SPSFAQ.


Backup and Antivirus for SharePoint

SPSFAQ050118 - Simple Backup method for SPS2001 - 0 Comments - stephencummins - Fri, Feb 13th, 2004 - Backup/Antivirus
Create a BAT file with this in it::

@echo off
echo +++++++++++++++++
echo %date%
c:
cd \program files\sharepoint portal server\bin
move d:\sharepointbackup\full d:\sharepointbackup\full.yesterday
@echo off
msdmback /b d:\sharepointbackup\full
echo completed



Open the msdmback.vbs file, search for "WScript.Echo
strBanner" and mark this line as TEXT.

c:\>at \\computername 3:00AM /Every:m,t,w,th,f,s,su cmd /c "sharepointbackup.bat > c:\sharepointstatus.log"

This will write a log file to c:\ every night with "completed" or nothing if it fails. Important note: make sure you save the .bat file to %systemroot%\system32

Based on comments posted to this site, thanks all!
SPSFAQ050217 - Are there any programs for backing up SharePoint 2003? - 0 Comments - stephencummins - Wed, Sep 17th, 2003 - Backup/Antivirus
There its, look here for details:

http://www.avepoint.com
SPSFAQ050216 - How can I do backups of SharePoint 2003 and even schedule then to run automatically? - 0 Comments - stephencummins - Wed, Sep 17th, 2003 - Backup/Antivirus
The easy way to do a backup is to create a bat file that does it for you and schedule it to run automatically at a specified time and date.

Create a file called "SharePoint_backup.bat"

Copy the following into it:

@echo off
echo +++++++++++++++++
echo Backup of all sites on the SharePoint 2003 Server
echo Written by Stephen Cummins (stephen@spsfaq.com)
echo +++++++++++++++++
c:
cd \Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\BIN
@echo off
stsadm.exe -o backup -url http://localhost -filename c:\SharePoint_backup.dat -overwrite
echo completed

Save it to C:\WINDOWS\system32, you can then just double-click the file it will create a backup of all the sites on the server onto the C: drive with the filename SharePoint_backup.dat

You can right-click this file and select "edit" to see how this is done.

To do this via the command line, cd to \Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\BIN

then type in

stsadm.exe -o backup -url http://localhost -filename c:\SharePoint_backup.dat -overwrite


Also, as a seperate step from the bat file, if you want to schedule this to happen automatically at 3am every morning, go to a command line and type:

at \\infox 3:00AM /Every:m,t,w,th,f,s,su cmd /c "SharePoint_backup.bat"

You'll then see a message giving it an ID=1 or something similar.

You can see this task listed or delete it from Start | All Programs | Accessories | System Tools | Scheduled Tasks

If the server has any regular backup procedure in place, it will pick up this .dat file. It might be wise to check if it need to be specified explicitly though. An external backup will copy this file off the server and is therefore protection against hard disk failure.

Restoring is a matter of typing in at the command line the following:

cd \Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\BIN

then type in

stsadm.exe -o restore -url http://localhost -filename SharePoint_backup.dat -overwrite

Hope that's more helpful than the help files!

Stephen

With thanks to David M who added the useful comments to SPSFAQ050103 - How can I schedule regular Backups of SharePoint?

UPDATE:

The following was sent me recently as some additional information on backup and restore for SharePoint 2003. Be sure the read the Admin files too!

The backup of the STSadm.exe make a kind of crash back up of the site but it needs to recreate the site with his database and his web server (You 'll have to get a manual backup of the config db)

For example, you can't recreate a site with this kind of Back Up if the server has been formatted ...
But for just restore the content on a server , it's really useful. I use this operation for save daily the content of my team site.
And it can not backup or restore a Portal site 2003

For make my real Back UP, i use the SPSbackup.exe in "Program Files\SharePoint Portal Server\Bin"

It just reproduce the BackUp function of the Portal 's Backup Client. And he can backup the team site too so...

I use this command line : spsbackup.exe /all /file "c:\SPSbackup" /overwrite

and i put it in a .bat like your tip

@echo off
echo ===============================
echo Backup sites on the SharePoint Portal 2003 Server
echo ===============================
c:
cd \Program Files\SharePoint Portal Server\Bin
@echo off
spsbackup.exe /all /file "c:\SPSbackup" /overwrite
echo completed

I hope it will help you, and another people

Renaud COMTE
SPSFAQ050115 - Anti-virus news Web Part from Sophos - 0 Comments - stephencummins - Mon, Apr 14th, 2003 - Backup/Antivirus
Here is a Web Part to show latest virus stats and virus hoax info from sophos, they allow free use of this info, they even provide the code if you email them, all they ask is you name them as the source and do not alter the layout of each table, (you can change the colours to fit your corporate scheme though.) I put all 3 table on 1 page for ease.

Only requirement is web access as it pulls the info direct from sophos's site

i think this would be usefull info to stop users logging those annoying calls to the hell desk

Peter White

(right-click and select save as... to download)

http://www.spsfaq.com/downloads/sophos.dwp

http://www.spsfaq.com/downloads/sophos_virus_info_sps2003.dwp

SPSFAQ050114 - How to implement a SharePoint recovery procedure using BackupExec 8.6 with the SharePoint agent installed - 0 Comments - stephencummins - Mon, Feb 3rd, 2003 - Backup/Antivirus
This procedure was actually documented during a recovery situation involving a hardware failure. In this particular situation, I had the O/S on a drive in the server and the SharePoint data on a external drive array running RAID 5.


Suggested environment for this procedure:
1) Win2K Server SP3
2) IE 6 SP1
3) All of the Critical Updates
4) SharePoint should have SP1 applied
5) Solely dedicated to SharePoint (my server also had SharePoint accessible only via SSL)
6) BackupExec 8.6 for Win 2k, Build 3878, fully patched for SharePoint, installed on a separate media server


Procedure for creating the Backup job in BackupExec:
1) Select only the O/S drive for normal file backup
2) Select the SharePoint Server area and the System State
3) Set the job to be a FULL backup each night of your backups (normally
I would advocate differentials for most nights, but not with SharePoint)
4) Check the backup log each day after a backup job has completed; if SharePoint did not backup, this is your first indication that the server is about to die.


Procedure for recovering SharePoint from BackupExec:
1) Uninstall SharePoint completely per KBA Q295704
2) Reboot server
3) Install SPS from original media
4) Install SPS SP1
5) Reboot server
6) From the BackupExec Media server, run a full restore of the O/S drive, SharePoint backup, and System State
7) Using the SHUTDOWN tool from the Resource Kit, remotely reboot the SharePoint server
8) Verify access to the workspaces
9) Run a backup (as defined above) from the BackupExec Media server of the O/S drive, SharePoint data, and the System State.


Additional Information
This procedure assumes that you want to recover ALL workspaces to the point of the last backup; there is currently no way the agent can do individual workspace backups and recoveries ("brick-level," for those familiar with Exchange terminology). If you need to have the ability to recover individual workspaces, you must have a recovery server set up and run your restore to that server; BackupExec allows you to redirect SharePoint data to different SharePoint servers. Once you have recovered to a different server, you must then use the Export and Import tools supplied by Microsoft in the SharePoint Resource Kit to place the workspace on the correct server. Bear in mind that you will lose some features like versioning.

In order for this process to work, SharePoint must be up and running on the target machine with no errors; that is why a complete uninstall and reinstall of the product is necessary. If SharePoint is not functioning properly when you run the restore, you will find -1018 errors in the logs and the Information Store will not mount properly.

This procedure only works with BackupExec; it has not been tested with any other third-party software. Whatever backup method you use, make sure it is SharePoint-compliant.

Matt Cross
SPSFAQ050113 - Are there ways to do document level Backup and restore of SharePoint documents? - 0 Comments - stephencummins - Sun, Nov 17th, 2002 - Backup/Antivirus
SPSFAQ050112 - Are there any alternative ways to backup SharePoint? - 0 Comments - stephencummins - Tue, Aug 27th, 2002 - Backup/Antivirus
This isn't a definitive answer, but it should give you some ideas! Stephen

I know everyone has been asking for a better way than msdmback.vbs to backup and restore SPS. I was certainly not satisfied with the answers from Microsoft, or the answers I could find on SPSFAQ.
Msdmback is too limited to be useful for an SPS database of any significant size. Only being able to do full backups, and only being able to dump to a file are limitations we should not have to live with. So I've spent the better part of a week researching SPS and have developed a much better solution for backing up and restoring SPS, that doesn't require any third-party software.

The key to the problem is understanding SPS's plumbing. At the heart of it, SPS is made up of Exchange + MSSearch. So, the key to recovering SPS, lies in Exchange disaster recovery. SPS is simply Exchange with a single storage group with a single database.

So first, we're going to make SPS behave like a default Exchange instance behaves. Note that all these registry edits take place relative to LM\System\CurrentControlSet\MSExchangeIS\CfgData, and all standard RegEdit disclaimers apply.

Open the StorageGroups key. It should contain one key which in turn contains another subkey. The first key is your Storage Group GUID, the subkey is your Database GUID. You'll use these GUIDs later.

Open the Objects key, then your Storage Group GUID key. Change Circular Logging from 1 to 0. Circular logging is now disabled, like a default install of Exchange. This provides a higher level of recoverability at the cost of having to backup your database to groom the logfiles.

You can now use NTBackup to backup your SPS server by selecting the Microsoft Exchange Server\SPS\Microsoft Information Store node. Plus, since circular logging is disabled, you now have the ability to perform incremental or differential backups of SPS!!! Just select the backup type under Advanced. If you want to backup the full text search database as well, you'll need to stop the MSSearch service, backup the Data\FTData directory located under your SPS install point, and restart the service after the backup completes. Note that no full text searches can be performed while the service is stopped.

Now, to restore the database, we first must dismount it from the Storage Group. Open the Objects key, then your Database GUID key. Change DB Offline from 0 to 1. Stop the Exchange Service (which will stop SPS), then start the Exchange Service. The service will start, but the database will not be mounted. Now we can use NTBackup to restore our backup set. Just set the temporary path to something like c:\temp. If you're restoring from a full backup, check both Last Backup Set, and Mount Database After Restore Completes. If you have additional logfiles to apply from an incremental or differential backup, leave the two boxes unchecked until you restore your final logfile, then check them both. Restart the SPS service, and you're back in business. You can then either repopulate your Full Text Data, or stop the MSSearch service and restore it from your backup as well.

Some notes about this procedure. First, it is totally unsupported by me or Microsoft. Second, since all the
workspaces are stored in a single Exchange database, this procedure is still all-or-nothing as far as workspaces go. Third, make sure you have a good understanding of Exchange 2000 disaster recovery.
Http://www.microsoft.com/technet/prodtechnol/exchange/exchange2000/support/dbrecovr.asp
is a great resource. Fourth, realize SPS is a non-AD-enabled version of Exchange which makes certain things easier, and other things harder. Deploying a recovery server is easier because you aren't limited by Exchange's one Organization per Forest, and can deploy an SPS recovery server into the same domain as your production server. But, using NTBackup from a remote server and tape drive is harder because NTBackup expects to find information about Exchange in AD, which doesn't exist for SPS. So, NTBackup will complain about SPS not being a valid Exchange Server.

You can work around this limitation by running NTBackup from the command line and using valid .BKS files to define the path to the database, or simply use a tape drive attached to the SPS server. Finally, test this procedure before you depend on it for a production environment. Just because this works for me doesn't mean it will work in your environment.

Dave Loder
SPSFAQ050111 - Backup: Can you suggest a good backup script for SPS that does more than MSDMBACK.VBS? - 0 Comments - stephencummins - Mon, Jun 10th, 2002 - Backup/Antivirus
Modified the MSDMBACK.VBS script in order to schedule a nightly backup image file creation using the Task Scheduler. The script will automatically E-Mail with success and failure information.

Hope someone finds it useful, just replace the E-Mail information with the appropriate data. You will have to create a batch file to delete the original backup file and run the VBS script.

del "d:\program files\spsback\spsback1"
backup -b "d:\program files\spsback\spsback1"

John Ugarte

For others benefit you need to update the variables in the script as follows:

Const R_Email_Address = "TO@MYADDRESS.com"
Const R2_Email_Address = "TO@MYADDRESS.com, TO.MYPAGER@MYADDRESS.com"
Const L_Email_Address = "FROM.SHAREPOINT.ADMIN@MYADDRESS.com"

Const R_Email_Address - Address or addresses separated by commas for notification of sucess.
Const R2_Email_Address - Address or addresses separated by commas for notification of failure.
Const L_Email_Address - Address messages are sent from.

Steven Collier

http://www.spsfaq.com/downloads/backup.vbs

(right-click and "Save Target As..." to download)

Page 2 of 4  -  Jump to: 1 2 3 4

Search options
Search for
   
In fields
   
In category
   
Dated in
   

links
subscribe
Get the latest posts via email:

quick search
Search via Google:

random books


Copyright © SPSFAQ.com, Stephen Cummins Limited, All Rights Reserved