About Me

My photo
System Analyst,Collaboration Servers Integrate,Enterprise setup planner.

Thursday, 17 June 2010

Automatic Share point 2007 Site Backups

Step1: open Notepad and paste the following code

@echo off

echo getting todays date
for /F "tokens=1-4 delims=/- " %%A in ('date/T') do set DATE=%%A%%B%%C%%D

echo getting todays time
for /F "tokens=1-4 delims=:., " %%a in ('time/T') do set TIME=%DATE%%%a%%b%%c


cd \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
@echo off

echo perform backup
stsadm.exe -o backup -url http://mis-app-test:21208 -filename "D:\share point backup\backup%TIME%.dat" -overwrite

echo zip file
pkzipc.exe -max -add=update -dir=full "backup%TIME%.zip" "backup%TIME%.dat"

echo remove original file
del /q /f "backup%TIME%.dat"

Step2:Save as .bat file

Step 3:Create the Task schedule(goto Control panel-->Scheduler task)

Step 4:Point out the .bat file which you created for sc
hedule.

No comments:

Post a Comment