Monday, October 22, 2007

Sharepoint: Automated Backups using STSADM

During the recent IT Roundtable Podcast there was discussion about SharePoint and how to automate the backup process.

We are using WSS 3.0, not the full blown MOSS (Microsoft Office Sharepoint Server) software.

The following is my exact backup command (inside a batch file that is scheduled to run every night at 11:00pm):

c:

cd "\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"

stsadm -o backup -directory
\\ccm-gallery\ITBackup\ccm-sps\Sharepoint -backupmethod full

Basically this command does a full farm backup of your sharepoint environment into a subfolder. This will backup all necessary sharepoint databases / configurations / xml files ect that are need to recreate the sharepoint site.

WARNING: This will take care of everything inside of the Sharepoint WSS environment. If you customize anything outside of the environment (ie: create new master pages, implement FBA, or other alternative authentication schemes) - you will need to back these up seperately!

For safety sake, I run the STSADM commands automatically, then I also drop a full backup of the C:\InetPub folders.

When I restored my server recently, our intranet (plain vanilla WSS 3.0 Site with Windows Auth) restored in about 5 minutes after the server was rebuilt.

WARNING #2: The backup script I have proposed here creates a new subdirectory every time a backup takes place and drops the whole farm there. For us this is about 1.2 GB every time there is a backup. So make sure you keep that area fairly clean. We are doing backups to another server with 500Gb just for doing these kind of backups!

This command is just built into Sharepoint... Works great!

2 comments:

Anonymous said...

YOU ROCK! Thank you! Nothing else I tried worked plus this is way easier than the scripts I have tried in the past. Thanks so much!

Andrew said...

This helped us as well. We spent more time debugging vba scrips, than this took in backing up our entire site. Awsome.