Board index » off-topic » Re: How to start/stop server configuration remotely?
|
Craig Stuntz [TeamB]
Delphi Developer |
|
Craig Stuntz [TeamB]
Delphi Developer |
Re: How to start/stop server configuration remotely?2006-03-16 08:52:40 PM off-topic18 Yakushkov Mikhail wrote: QuoteHow can I stop and stop a server configuration remotely? remote server are on the same domain. Expand the list of services and start or stop the configuration. -- Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz How to ask questions the smart way: www.catb.org/~esr/faqs/smart-questions.html |
| Yakushkov Mikhail
Delphi Developer |
2006-03-16 09:19:21 PM
Re:Re: How to start/stop server configuration remotely?
How can I stop and stop a server configuration remotely?
I've got two server configuration installed on server1. I like to perform server configuration backup from remote machine server2 (a build server). I cannot find any information about such situation only how start/stop server localy. My StarTeam server running as a Windows-service. Any suggestions? |
| Yakushkov Mikhail
Delphi Developer |
2006-03-16 09:55:49 PM
Re:Re: How to start/stop server configuration remotely?
I've found an answer by myself. At least it works if StarTeam server runs
as service. The key is SC command. so here is the usage of this command for the case of star/stop a service: start server: sc \\computername start StarTeamServer-<configuration name> stop server: sc \\computername stop StarTeamServer-<configuration name> where <configuration name>- the name of target configuration without <>. Note you must avoid any spaces in service name! It's impossible just to pause/resume this service. This command takes some time and is asynchronuos so you must wait some time or query service status. You can query status of StarTeam service using this command: sc \\computername query StarTeamServer-<configuration name> MY>How can I stop and stop a server configuration remotely? MY> MY>I've got two server configuration installed on server1. I like to MY>perform server configuration backup from remote machine server2 (a MY>build server). I cannot find any information about such situation MY>only how start/stop server localy. My StarTeam server running as a MY>Windows-service. MY> MY>Any suggestions? MY> {smallsort} |
| Yakushkov Mikhail
Delphi Developer |
2006-03-16 09:58:06 PM
Re:Re: How to start/stop server configuration remotely?
Thank you Craig, I've found an answer by my self. Google rules! Probably
I need a way to perform those operations from nightly backup script. So hand using Computer Management isn't an option in this scenario. C>Yakushkov Mikhail wrote: C> Quote>How can I stop and stop a server configuration remotely? C>remote server are on the same domain. Expand the list of services and C>start or stop the configuration. C> |
| David Hegland
Delphi Developer |
2006-03-17 03:09:34 AM
Re:Re: How to start/stop server configuration remotely?
"Yakushkov Mikhail" < XXXX@XXXXX.COM >wrote in message
QuoteI've found an answer by myself. At least it works if StarTeam server runs QuoteNote you must avoid any spaces in service name! QuoteIt's impossible just to pause/resume this service. starteamserver I think will not. |
| Rob Evans
Delphi Developer |
2006-03-17 07:52:35 AM
Re:Re: How to start/stop server configuration remotely?
"Yakushkov Mikhail" < XXXX@XXXXX.COM >wrote in message
QuoteI've found an answer by myself. At least it works if StarTeam server prevents activity on the database and is equivalent to "pause") and unlock it afterwards (equivalent to "resume"). To lock the server (in a Windows batch file): %stcmd% Server-mode -s %access% -mode lock where stcmd stands for the local path to "stcmd.exe" eg. "C:\Program Files\Borland\StarTeam 2005 R2\stcmd.exe" and access="Administrator:password@machine:port" machine is where the StarTeam Server is running port is the TCP/IP on which it is accessed To unlock the server (in a Windows batch file): %stcmd% Server-mode -s %access% -mode unlock These can both be issued remotely providing you have network access. The only time you would need to stop the server is to run a Purge. -- Regards, Rob E. |
| Yakushkov Mikhail
Delphi Developer |
2006-03-17 05:34:53 PM
Re:Re: How to start/stop server configuration remotely?
Thank you for replay.
RE>Why do you need to stop the server? I just try to stick to manual :) "lock it for 30 minutes, shut the server down, perform backup, start the server up." RE>If you're doing a backup, then all you need to do is lock it (this RE>prevents activity on the database and is equivalent to "pause") and RE>unlock it afterwards (equivalent to "resume"). If you sure I'll use it. RE>To lock the server (in a Windows batch file): RE>%stcmd% Server-mode -s %access% -mode lock RE>where stcmd stands for the local path to "stcmd.exe" eg. "C:\Program RE>Files\Borland\StarTeam 2005 R2\stcmd.exe" RE> RE>and access="Administrator:password@machine:port" RE>machine is where the StarTeam Server is running RE>port is the TCP/IP on which it is accessed RE>To unlock the server (in a Windows batch file): RE>%stcmd% Server-mode -s %access% -mode unlock RE>These can both be issued remotely providing you have network access. thank you I'll use it in my super-pooper-backup-script. |
| Yakushkov Mikhail
Delphi Developer |
2006-03-17 05:41:13 PM
Re:Re: How to start/stop server configuration remotely?Quote>I've found an answer by myself. At least it works if StarTeam server SC command easy to use from a batch file or NAnt build file. It present on Windows XP, 2003 and possibly other. But any way it could be used in right place. Thank you. Quote>Note you must avoid any spaces in service name! You aren't right. It is not a file name. I just tried your approach and it doesn't work. You should leave the spaces out. [SC] EnumQueryServicesStatus:OpenService FAILED 1060: Quote>It's impossible just to pause/resume this service. DH>actually pause, which starteamserver I think will not. DH> It's possible to issue pause command but it returns an error: [SC] ControlService FAILED 1052: probably lock=pause and unlock=resume. |
| Craig Stuntz [TeamB]
Delphi Developer |
2006-03-17 09:58:02 PM
Re:Re: How to start/stop server configuration remotely?
Rob Evans wrote:
QuoteWhy do you need to stop the server? for your server, then backup the repository once that's complete. With Native-I / Pre-ST 2005 you must stop the server, though. -- Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt your DBs! Open Edition users, get 6.0.1.6 from mers.com |
| Mike Eshva
Delphi Developer |
2006-03-19 07:25:28 AM
Re:Re: How to start/stop server configuration remotely?Quote>Why do you need to stop the server? Anyway I made already a NAnt custom task for locking/unlocking StarTeam server and plan to use them in my script insteed of shutting down/starting up. NAnt rules! Locking of the server isn't a problem for us because nobody works till night with the server. So locking and even shutting down is pretty safe for us and our development process. Quote
|
| Rob Evans
Delphi Developer |
2006-03-20 07:01:49 AM
Re:Re: How to start/stop server configuration remotely?
"Mike Eshva" < XXXX@XXXXX.COM >wrote:
Quote>>Why do you need to stop the server? data not referenced by the DB. But, if the DB is backed up after the repository, there may be data referenced by the DB that is missing from the repository backup - this is a bad situation. My tape backup software doesn't allow me to back up the DB before the repository (in the one run), so I lock StarTeam. QuoteAnyway I made already a NAnt custom task for locking/unlocking processing. -- Regards, Rob E. |
| Craig Stuntz [TeamB]
Delphi Developer |
2006-03-20 08:11:14 PM
Re:Re: How to start/stop server configuration remotely?
Rob Evans wrote:
QuoteIt is true - the DB and repository could get out of sync. If you back (plus possibly more). It's OK for the repository to be "ahead" of the DB, but not OK for the DB to be "ahead" of the repository. However, the Native-II repository is so stable that even if the DB was ahead of the repository the only effect you would see is errors when you tried to access the specific file versions not in the repository. Everything else would work fine. -- Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz Want to help make Delphi and InterBase better? Use QC! qc.borland.com -- Vote for important issues |
| Craig Stuntz [TeamB]
Delphi Developer |
2006-03-20 08:11:51 PM
Re:Re: How to start/stop server configuration remotely?
Mike Eshva wrote:
QuoteI'm surprised. How is it possible? I think DB and repository could the DB then you already have all the versions you need for the DB. You do *not* need to lock the server *if* you have a Native-II vault. -- Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz Useful articles about InterBase development: blogs.teamb.com/craigstuntz/category/21.aspx |
| Mike Eshva
Delphi Developer |
2006-03-21 06:28:06 AM
Re:Re: How to start/stop server configuration remotely?
Rob, Craig thank you very much! Now I understand almost everything about
StarTeam backup. |
| David Hegland
Delphi Developer |
2006-03-22 11:31:38 PM
Re:Re: How to start/stop server configuration remotely?
Thanks to Craig and Rob, we've covered nearly everything.
Since we've gone into such detail, here's a couple more useful details. (1) It's a good idea to stage your backup. I backup the StarTeam server to another disk, DB first, and then vault (nII) and then a separate process controlled by our IT team copies to tape from that other disk. This keeps my backup cycle super short, like about 10min, and keeps things nicely in sync. If anyone checks in during the backup, it's possible I get a stray archive, but that's a trivial risk. (2) It's been said that you only have to stop your server for a purge, and technically that is true. However, there are good reasons to a periodic stop/start. I haven't bounced my StarTeam server for a very very long time, and I noticed that when I did bounce it I lost a lot of audit history to the startup audit purge. Now that 's totally normal, but I got spoiled having old audit history around and kinda forgot that it would be purged next restart. Also, it's just a good safety measure to stop/start once in a while to make sure that the startup is smooth and error-free. (3) I've said it a bunch of times, but it's worth repeating. Do a test restore regularly. Best thing to do is maintain a complete test server. This confirms that your backup is restorable and also provides a good place to test new ideas without impacting your live repository. |
