Creating automatic SharePoint backup script (.dat)

Create Backups Directory

Create a backup directory for storing the scheduled SharePoint backups (e.g.d:\backupsharepoint)

Create Bat File Directory

Create a directory for storing the backup script file (e.g. d:\scriptssharepoint)

Create Bat File

Create a bat file using the code below, modified for your environment. Use UNC paths when using in a server farm environment.

@echo off

echo ====================================================

echo Backup Script For Office SharePoint Server 2007

echo ====================================================

cd \program files\common files\microsoft shared\web server extensions\12\bin

@echo off

stsadm.exe -o backup -url http://servername -filename d:\backupssharepoint\backupsharepoint.dat -overwrite

@echo off

echo completed

Schedule bat file

Schedule the backup to run frequently, during off peak hours.

Open Start > Programs > Accessories > System Tools > Scheduled Tasks

Add a Scheduled Task

Scheduled Task Welcome Screen, Click Next

Click the program you want Windows to run, Click Browse

Select the backupsharepoint.bat file you created (e.g. d:\scriptssharepoint\backupsharepoint.bat)

Name the task, Schedule it (e.g. Daily)

Start Time, Frequency, Start Date

Username and Password (use a domain user account that has proper permissions and non expiring password )


Verify Backups

Keep the backup directory secure. Monitor the job to ensure the job is running properly. Perform test restores from the backup files.


Popular posts from this blog

Using External Content Types with Stored Procedures with Input Parameters

HTTPS Site InfoPath Issue : You do not have permissions to access a web service that provides data required for this form to function correctly

Windows 7 Blue Screen because of ConnectiFy