Asked Questions about

Question: How can I safely backup my repository and server config files?

StarTeamSend this document to a colleague

As you create server configurations the server creates files and directories for you to hold your configuration and project information. These files should be backed up. The Repository Tools=>Verify that was added with StarTeam 4.1 also relies on the cache, which you should also want to include in the backup.

These files and directories include:

  • The Configuration and cipher files:

    • Configuration\server.scg

    • Configuration\server.cph

  • Database files:

    • Database\StarTeamDB.mdb (Assuming Access database)

  • Vault:

    • Archive dir: *.*

    • Attachments dir: *.*

  • Optional:

    • Cache dir: *.*

It is much preferred that the StarTeamDB.mdb (assuming Access database) and vault directories be backed up at the same time or at a point in time when no one is accessing/using them. A mismatch between the database and repository may cause data to be lost and/or unusable. For your backups to be most reliable it is best to close down the STVTS when creating your backups or use the server lock feature. If the STVTS is not closed down, you have the risk of the database and vault being mismatched as a check-in may be in progress at the time of the backup. If your starteam database and the repository vault directory are on separate systems, it is still very important that these items be backed up at the same time.

You should also be aware that your cipher phrase should be carefully documented and stored for safekeeping. If you forget and loose your cipher phrase you can loose the access to your StarTeam projects.

The cph and scg files normally do not change, but they are essential pieces of the repository. Their time-stamps do change with each restart of the STVTS. The .scg file is open while the STVTS is running. This can make it impossible for some backup systems to copy. You may consider copying the cph and scg files to one of the other directories that you are backing up to make certain they are saved.

If you are running the STVTS manually, the Shut Down option will close it gracefully.

If you are running STVTS as an NT Service you may go to the Services applet and stop the service there. After the backup is completed, you may restart the service.

You do not have to shutdown the STVTS to back it up. If you prefer an automated backup, with the advent of 3.0, service pack 2 included a useful new command: : stcmd30 servermode. This command can be incorporated in a batch file to automate the backup process.

From our help:

"A StarTeam user with administrative privileges can use stcmd servermode to lock and unlock a server. Locking a server limits server access while you perform backup or other procedures. When the server is locked, only server administration commands are accepted. When you unlock the server, normal operations resume. It is important to keep in mind that the lock prevents new access to the repository. It does not stop processes that have been initiated. You will thus want to wait a brief period of time before backing up if you are using the lock."


stcmd servermode [/pwdfile "fileName" ] [/cmp ] [/encrypt encryptionType ][ /q ] [/x ] /s "serverName" /mode[ lock | unlock ]


The following example uses stcmd servermode to lock the server using port 49201 on Orion.

stcmd30 servermode /s "JMarsh:password@Orion:49201" /mode lock

If you are still at an older build, you could utilize the NET Stop and NET Start commands. See the example below for more details.

You should also be aware that your cipher phrase should be carefully documented and stored for safekeeping. If you forget and loose your cipher phrase you can loose the access to your StarTeam projects.

Example (using StarTeam 3.x expressions):

Create a batch file to Stop the appropriate services, backup and Start the services. If you are also running Web Connect you will want to stop and start Web Connect as well.

Commands for batch file to stop services:

  • NET Stop StarTeamService

  • NET Stop ?Web Connect?

Commands for batch file to start services:

  • NET Start StarTeamService

  • NET Start ?Web Connect?.

Start the NT Scheduler Service in the control panel.

At the Command prompt use the AT command to setup the scheduled process:

C:\>AT \\ComputerName 01:00 /Every:M,T,W,Th,F C:\STPBatchFiles\Dobackup.bat