Upgrading SQL Server database on different VM
We need to upgrade TeamCity but also move our TeamCity server (we use a SQL database) to a new VM at the same time since we cannot upgrade the VM that we are currently using.
Is there any way we can install the latest version of TeamCity on the new VM and move the data straight across or do we have to install our current version of TeamCity on the new VM and then upgrade it?
On the Setting up TeamCity with MS SQL Server page (https://www.jetbrains.com/help/teamcity/setting-up-teamcity-with-ms-sql-server.html#SettingupTeamCitywithMSSQLServer-StartTeamCity) step 4 mentions "the name of the newly created database". Can I point this to a database that was created in a previous version of TeamCity that contains all our data?
Thanks
Please sign in to leave a comment.
Hello Andrew,
The safest approach, I believe, would be the following:
1) install your current version of TeamCity on a new VM;
2) connect this new instance of TeamCity to a copy of the database you currently have (you may backup and restore DB with maintainDB.bat approach as per this article - https://www.jetbrains.com/help/teamcity/creating-backup-via-maintaindb-command-line-tool.html);
3) check that TeamCity is starting properly;
4) now you can upgrade to the latest.
The DB schema upgrade will occur only during the upgrade sequence - if you would connect a DB with older schema to the newer TeamCity version after it was already set up, this might turn south.
If you take maintainDB approach, you may also opt to include Data Directory (and artifacts, if needed) into the backup so that it will be restored on the new instance. As a result, you will effectively have an upgraded copy of your current installation configuration-wise, while also retaining the metadata.
This article summarizes the steps required to copy a server, too: https://www.jetbrains.com/help/teamcity/how-to.html#HowTo...-CreateaCopyofTeamCityServerwithAllData
I hope this will prove helpful for your efforts. Kindly let me know in case of any further questions.