1. Copy and paste the text below in a notepad and save as a bat file.
2. Setup Windows schedular to run the bat file overnight.
3. Check logs files under ‘C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS’.
Note: The log file uses the ServerName-Date-Time.log format. Open and look for STSADM.EXE.
@echo off
echo ===============================================================
echo Backup Sharepoint Site Collection onto “D:\backup\SiteCollectionBackup.Dat”
echo ===============================================================
@echo off
::*****Change Directory to the 12 Hives*****
c:
cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
::*****Limit access to the http://team.adsinfotech.com.au site collection during backup*****
stsadm.exe -o setsitelock -url http://team.adsinfotech.com.au -lock readonly
::*****Back up the http://team.adsinfotech.com.au site collection*****
stsadm.exe -o backup -url http://team.adsinfotech.com.au -filename \\SERVERNAME\D$\backup\SiteCollectionBackup.Dat -overwrite
::*****Back up the farm*****
stsadm.exe -o backup -directory “D:\backup\Farm” -backupmethod full
::*****Remove lock on Limit access to the http://team.adsinfotech.com.au site collection during backup*****
stsadm.exe -o setsitelock -url http://team.adsinfotech.com.au -lock none
echo completed
Leave a Reply