SharePoint 2007 can be less than pleasant to fix if there are problems, and as I found out recently.. the quality of your backups can never be underestimated.
The Central Admin panel offers a good solution for backing up your farm, and can be accessed from the operations tab. There are hundreds of websites discussing backup strategies for MOSS and although that is not what this blog is about, they basically boil down to take a full backup of your farm using SharePoint but also databases via SQL Management Studio.
Where built in functionality falls short however, is the ability to automate regular backups. This, for me, is a huge stumbling block as backing up anything manually each day is never fun...
STSADM to the rescue..
Well, sort of. The command line tool STSADM can be used to kick off a full farm or single site collection backup easily enough, with no need to launch a web browser and manually start it. The syntax is shown below:
Using the following scarily entitled “catastrophic backup” option with the –backupmethod full flag, the entire farm can be packaged up nicely using a single command, to a location of your choice (provided the executor has farm wide admin status).
stsadm -o backup -directory "\\server\path\" -backupmethod full
Automation
With half the battle done, we now need to automate it. I created a relatively simple VBScript to manage daily runs of the backup process which creates a backup folder for the day run before email a completion or failure notification. You can download it below:
Feel free to modify it as you see fit, perhaps you could log the results to the error log of the machine, or implement some better error checking?
The only further step required is to schedule the process, and using Windows Task Scheduler on the machine where SharePoint is installed this is very straight forward. Ensure you set it to run as your SharePoint administration account

Of course, backups are completely useless unless they actually work, so always remember to test restoring from them at regular intervals :)