Finished backup script
The backup script is ready for deployment. It was determined to lock all vobs at once, back them all up then unlock the vobs. I also implemented the 7 days of history option. History is stored under d:\vobstore\backup as numbered directories (0-6 for Sun-Sat). The script now manages that area by first moving the current backup under d:\backup -> d:\vobstore\backup\
I was experiencing "Access denied" errors irradically until I found out that there may be .being-deleted files as described here. To solve this I implemented exclusions on the xcopy command (/exclude:d:\backup\exclude.strings) which tells xcopy to exclude things in the "c" directory - i.e. the cleartext pool - which Clearcase can easily recreate without data loss. This also has the effect of reducing the backup copy size in some cases significantly (e.g. \ASAP_Docs goes from 2.1 gig down to 1 gig!).
Here's a rough psuedo code of what the script does:
Obtain a list of all vobs
Lock all vobs
foreach @vobs
if d:\vobstore\backup\$current_day\$vob exists then
remove it
end if
move d:\backup\$vob -> d:\vobstore\backup\$current_day\$vob
copy $vob's storage area -> d:\backup\$vob
Next
Unlock all vobs
Cutting out the copying of cleartext pool has reduced the current backup time from 56 minutes (yes it grew) to 33 minutes.
Now, where are we WRT the SQL backup scripts?....