Discussion Forum for StarTeam Users
Posted by Brennan Easlick on May 02, 2000 at 19:02:47:
In Reply to: StarTeam 4.1 - Automatic shutdown posted by Sandy on April 21, 2000 at 16:08:23:
: Is there a way to shutdown StarTeam server automatically at a specific time before the backup starts?
You can force any NT Service to shutdown by using the command, NET STOP "servicename". You could use this command for the StarTeam service.
This is actually a feature included with the NT OS, but it is not always a graceful shutdown. It is not recommended you do this since users could be logged into the StarTeam server when it is forced to shutdown, possibly causing a rather annoying disruption of service to your users, or worse, be the cause of data integrity problems later.
A cleaner way to handle back ups is to the command line option, /mode lock, which will lock the StarTeam service, giving users a friendly message that the server is unavailable if they try and use it. You could tether the /mode lock command into a batch file for back ups.
Lock Server Batch File (LockServer.bat)
stcmd servermode /s "JMarsh:password@Orion:1024" /mode lock
Unlock Server Batch File (UnlockServer.bat)
stcmd servermode /s "JMarsh:password@Orion:1024" /mode unlock
These batch files can run at scheduled times, using something like the AT command for NT.
C:\>AT \\ComputerName 01:00 /Every:M,T,W,Th,F C:\STPBatchFiles\LockServer.bat
It is important to note, while the StarTeam server is running, the .cfg file (StarTeam configuration file), is locked. This is usually not a problem, because the .cfg file changes infrequently, and holds such information as the repository path, and endpoint of the server. So this file does not need to be backed up on a regular basis, and in worst cases, can even be manually recreated.
One last note, make sure to back your StarTeam .cph file (stored with your .scg) if you used a cipher phrase to encrypt your data. This file cannot be easily created, and will make things much simpler if it is available to you on a restore.
Post a Followup