Clone a testbed for TeamCity EAP

Hi,

My company is current using teamcity and I am one of the guy who look after it.
I wish to test if the upgrade works for our environment, currently, the TeamCity Server is running in a VMware virtual machine.
I would like to clone this VM and copy the TeamCity DB (under MS-SQL), point the cloned VM of TeamCity server to the copy of TeamCity DB, and upgraded the clone to latest EAP.

How can I point a copy of TeamCity database to another TeamCity Server?
Can you provide a list of steps for me to follow?

Many thanks,
Tom

4 comments
Comment actions Permalink

I have try to install EAP on another box, create a new DB in MS-SQL, restore the new DB from existing TeamCity DB, and point EAP TeamCity to Cloned DB by putting database.properties and the jtds driver.
However, when I start TeamCity Service, the page shows an error: Error message: jetbrains.buildServer.serverSide.DatabaseVersionMismatchException: Database version mismatch: Configuration version is 305 but Database version is 0.

Is there anyway to fix it? Does that means if I upgrade the existing TeamCity to EAP I will also encounter this problem?

0
Comment actions Permalink

Thomas,

which version of TeamCity are you using on production?

Best regards,
Leonid

0
Comment actions Permalink

Hi Leonid,

We are using TeamCity Enterprise Version 4.5.4 (build 9071) in Prod, and trying to upgrade to latest EAP.

Regards,
Thomas

0
Comment actions Permalink

Thomas,

sorry for the delay.

In case of 4.5.4 with DB in MS SQL, the simplest way to make a clone is the following scenario:

1. Shut the production TeamCity server down.
2. Make a copy of the production TeamCity data directory (you can see the path to the data directory on the Administration / Server Configuration / General page when the server is running).
3. Make a database snapshot, using RDBMS native tools.
4. Start the production TeamCity up.

5. Install the new TeamCity software on the separated box (or VM).
6. Import the database snapshot as a separated database (may be even on the same MS SQL server).
7. Unpack the copy (mentioned in p.2) into the new TeamCity data directory.
8. In the 'config/database.properties' file modufy the 'connectionUrl' property to get it relate to the new database.
9. Start the new TeamCity server up.
10. Go to the agents page and unregister all agents.
11. Go to the Administration / Server Configuration page and modify the Server URL property to get it be correct.

and enjoy!

Best regards

0

Please sign in to leave a comment.