Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for example of scripts people are using to automate the backup of MOSS 2007 and WSS 3.0. Would be great to have built in support for various types and schedule of backup.

share|improve this question
up vote 3 down vote accepted

Here is a powershell solution - it is pretty flexible and can backup everything you need to restore your site, or just individual site collections.

share|improve this answer

We have a very small setup and run a full backup nightly.

One batch script that looks like this:

cd \
cd "Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"
# you may hit some permissions problems here. our backup writes to the DB server, and is enacted by an account that has backup access to DB and write access to server
stsadm -o backup -directory \\servername\share\sharepoint_backup\ -backupmethod full

Then to clean up every N days the backups I use BackupCleanup.vbs. Check the comments at the top for testing.


cscript.exe BackupCleanUp.vbs <Number of Days> \\servername\share\sharepoint_backup\spbrtoc.xml
share|improve this answer

SQL Server has some pretty good tools for that. And a content database backup is pretty useful for most disaster recovery models.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.