Ever wondered how to take a full manual backup of your windows sharepoint services 3.0 [wss] site? Of course you can use stsadm command to do a full backup but you'll have to run this command every time you need to take your site's backup.
Below is a .bat script that you can use to automate this manual process. It automatically creates a filename for you and takes your wss site's backup. You can schedule this .bat file using windows schedule and your wss site's backup will take care of itself.
... and here's the script:
@echo off
echo +++++++++++++++++
echo Initializing backup...
echo Starting backup...
echo +++++++++++++++++
for /f "delims=/ tokens=1-3" %%a in ("%DATE:~4%") do (
for /f "delims=:. tokens=1-4" %%m in ("%TIME: =0%") do (
set FILENAME=site_backup-%%c-%%b-%%a-%%m%%n%%o%%p
)
)
c:
cd \Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN
@echo off
stsadm.exe -o backup -url http://server -filename D:\%FILENAME%.dat -overwrite
echo Backup complete.
Simply copy, and then save the above script as a .bat file, and that's it.
Hope it helps, as it definitely helped me. As always, thank you to all those who helped me create this script.