Tuesday 18 February 2014

Automatic take sharepoint site backup using batch file and scheduler


It is not possible to schedule sharepoint backup from sharepoint central admin site.
Below is process to take backup using batch file and after running schedule on specific time.
1. Open notepad and paste below code.
@echo off
@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm"
cd c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
@echo off
md "%DATE:/=_%"
stsadm -o backup -url "http://localhost:8080" -filename "E:\MOSS_Backup\%DATE:/=_%.bak"
echo completed
2. Save it as AutoBackup.bat (Change your site name )

Set Task schedular for this batch file and take backup on schedule time.

No comments:

Post a Comment