View Full Version : Multiple Servers - Not on the same machine
Server version = 2.0.19.40
How come you can never find what you're looking for?
I've got 2 servers for my gaming community. One is run out of my house and the other is run out of my wife's work, both with low upload bandwidth hence the reason for 2 of them. The one at my house is the "main" server, while the other one is really for overflow. I've got about 50 people registered on my main server. I setup, thru a batch file, FTP, and scheduler, a way to upload the server.dbs file from my main server to the secondary server at my wife's work. The upload will happen a few minutes before midnight, every night. At midnight, my secondary server will reboot itself. I've got another batch file setup to make a backup of the old server.dbs file, copy the new one to the right directory and launch TS2. This way my user's only have to "register" with the main server and by the next day they will be able to log onto the secondary server too. They will also be able to see all the channels, just like the main server is setup for. Pretty good.
Here's the problem.
When you copy the server.dbs file over, you also inherit the server's name and description. While the main server is called "Main server", I'd like the secondary server to be called "Backup Server", or whatever. Unfortunately both servers get the same name cause they pretty much share the same server.dbs file.
So who can tell me how to set the name and description of the server for each one without it using the server.dbs' setting??
Thanks
Bump.
No one has an answer for this?
So who can tell me how to set the name and description of the server for each one without it using the server.dbs' setting??
Don't think this is possible !
And I doubt there is a easy solution as you're talking about a VERY VERY special thing. The only solution I would see, is to edit the server name when ever you copy it around. This should be possible, but for sure it's not an easy solution.
If you know what you have to do, this is as easy as what he already did with the server.dbs.
If you can shedule the FTP upload, you can shedule Telnet commands, too.
I use "Telnet Scripting Tool" for this task. (See attachment)
And this is the script file that must be executed:
**SERVER_IP/DNS** 51234
WAIT "[TS]"
SEND "sel **SERVER_UDP_PORT**\m"
WAIT "OK"
The following commands depend on your server permissions. You must have the right to edit server name and welcome message.
SEND "login **ADMIN_NAME** **PASSWORD*\m"
or
SEND "slogin **SUPER_ADMIN_NAME** **PASSWORD*\m"
WAIT "OK"
SEND "serverset server_name **SERVER_NAME**\m"
WAIT "OK"
SEND "serverset server_welcomemessage **WELCOME_MESSAGE**\m"
WAIT "OK"
SEND "quit\m"
This Script can be saved as txt-File and must be passed as parameter to "TST10.exe".
Example:
"C:\Telnet\TST10.exe" /r:SCRIPT.txt /m
"r" specifies the script to run, "m" let's the script run minimized, so there won't be an annoying window popping up.
Ch'Ih-Yu;
Thanks for the reply, sounds promising and inventive :), in fact it sounds similar to what I've done. ;) . I've already "jimmy-rigged" my server to copy the file around, now add this to the batch file and give it a go. I'll try it when I get home from work.
As a side note, I've seen that some in the forums have multiple server they admin as well, you'd think the ability to keep users registration among the servers common. Perhaps it'll be a feature TS2 designers could add to the TS2 server, a "Master" server and "Slave" servers and sync the databases, but keep the names and descriptions separate.
Thanks
wow, did not thought that it would be possible over telnet !
thx Ch'Ih !
Ch'Ih-Yu
I got it to work, but had to play with it a little.
Seems even though my ID can change the server name/description through the web interface, it doesn't have sufficent rights going through Telnet, so I use the superadmin and worked. ;)
While I've got a automated function on the master Teamspeak server to FTP upload the server.dbs file to the backup teamspeak server, here's the thought behind my batch file on the backup server to rename the files and launch TS2 and make the name changes:
*copy server.dbs to server_old.dbs (make a backup of the current DBS file)
*copy server_new.dbs to server.dbs (take the FTP uploaded DBS file and copy it to the right name)
*Launch Teamspeak server
*Dir c:\winnt\system32 /s (This is about a 10sec delay)
*Telnet into server and change name and description using TST10.
*Exit
Originally I didn't have the DIR command listed, but I had a problem with the changes not taking. If you can picture the batch file without the DIR command, the Teamspeak server would launch, but it takes 1-3 secs for the application to load, Telnet was already attempting to change the server name and desc. before the app was completely up, hence the info didn't get changed. Well I was going to use the CHOICE command with NUL choice option and have it count down from 5 secs, but of course under Windows 2000 the CHOICE command is gone. So I just needed a way to come up with a 5 sec delay, giving Teamspeak enough time to launch properly. So I decided use a simple DIR command and have it list the folders and subfolders of the system32 folder, which worked out to be about 7-10 secs. It's not the perfect way of doing it, but it works flawlessly every time. So now the events are:
On the Master Teamspeak server:
*Midnight - Master Teamspeak server uploads server.dbs to backup server using FTP, but names it server_new.dbs
On the Backup Teamspeak server:
*Server automatically reboots at 12:30am (this is done through a program called poweroff)
*Server automatically signs itself into windows
*Through startup folder run TS2.bat
***TS2.bat***
*copy server.dbs to server_old.dbs (make a backup of the current DBS file)
*copy server_new.dbs to server.dbs (take the FTP uploaded DBS file and copy it to the right name)
*Launch Teamspeak server
*Dir c:\winnt\system32 /s (This is about a 10sec delay)
*Telnet into server and change name and description using TST10.
*Exit
If anyone has a need for this, I can post the actual batch files (modified to remove my specific and private info) I used to make this work.
For all people who wan't to use choice.com on Windows 2000 or Windows XP, see attachment.
Thanks to STIRB for this file.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.