Just copy backup part or restore part and past it in a new file then save it as *.bat
Backup Batch
Echo Site BackUp
@SET STSADM="%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
pause
%STSADM% -o backup -url http://localhost:2009/ -filename "FileName.bak" -overwrite
%STSADM% -o execadmsvcjobs
Restore Batch
Echo Restore Site
@SET STSADM="%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
pause
%STSADM% -o restore -url http://localhost:5000/ -filename "FileName.bak" -overwrite
%STSADM% -o execadmsvcjobs
Thanks man and you are welcome
ReplyDelete