Upgrade from 32 to 63 bit version: do I have to backup/restore the database?

The ContinuaCI server version is 1.8.1.1001, located in C:\Program Files (x86)\VSoft Technologies\ContinuaCI. The installer for 1.9.1.729 suggests to install in directory C:\Program Files\VSoft Technologies\ContinuaCI.

Will the server installation migrate all settings and projects to the new folder, or do I have to backup / restore the database?

Many thanks
mjn

Hi @mjustin_de,

Unfortunately, the path from a old 32-bit version to a 64-bit version is more of a migration than an upgrade. So there’s a number for steps to work through…

The following instructions assume that you are using the bundled PostgreSQL database. Let us know if you are using a separate PostgreSQL or SQL Server database.

a) First, copy the following files to a backup folder:

  • Server configuration file: C:\Program Files (x86)\VSoft Technologies\ContinuaCI\Server\Continua.Server.Service.exe.config

  • Agent configuration file: C:\Program Files (x86)\VSoft Technologies\ContinuaCI Agent\Continua.Agent.Service.exe.config

b) Next, take a backup of the database:

Open a Command Prompt, navigate to the folder C:\Program Files (x86)\VSoft Technologies\ContinuaCI\Server\PostgreSQL\bin and run:

pg_dump.exe -h localhost -p 9001 -U postgres -F p -f C:\backups\ContinuaCI.bak ContinuaCI

You will be prompted for a password. You can get this from the hibernate-configuration section of the “server configuration file”, under <property name="connection.connection_string">

c) Note which user account the Continua CI Server service and ContinuaCI Agent service are logged in as, in the Windows Services app.

d) Uninstall Continua CI Server and Continua CI Agent.

e) Open Internet Information Services Manager, find the ContinuaCI website, note the port that it is using, then delete the Continua CI website.

f) Delete the folder C:\Program Files (x86)\VSoft Technologies

g) Rename the folder C:\ProgramData\VSoft (e.g. to something like C:\ProgramData\VSoft_old)

h) Install the latest Continua CI Server version.

In the “Service” step, enter the user name and password for the Continua CI Server service account as noted before. The service ports used previously are in the continua-configuration section of the server configuration file under endpoints. e.g.

<endpoints port="9000" serverHostName="localhost" serverPort="9000" serverSSHPort="9010"/>

In the “Share” step, choose “Use an existing share” and choose the share you used before. This is in the appSettings section of the server configuration file under the key Continua.Builds.DataSharePath. e.g.

<add key="Continua.Builds.DataSharePath" value="\\ServerName\ShareName"/>

In the “Database” step, choose “PostgreSQL”, ensure that “Use your own existing PostgreSQL installation” is not checked.

In the “IIS Configuration” step, ensure that the “Site Name” and “Port” are as required.

In the “Authentication” step, check that you are using the same authentication settings as before. The previous settings can be found in the continua-configuration section of the server configuration file under authentication. e.g.

<authentication mode="Mixed" fqdn="team.company.com" administratorsGroup="Continua Administrators" groupsContainer=""/>

i) Install the Continua CI Agent

In the “Service User” step, enter the user name and password for the ContinuaCI Agent Service account as noted before.

In the “Select Continua CI Server” step, enter the server name and ports. The previous settings can be found in the continua-configuration section of the agent configuration file under endpoints. e.g.

<endpoints port="9002" serverHostName="localhost" serverPort="9000"/>

In the “Select Continua CI Agent Workspace Path” step, the previous workspace folder can be found in the appSetting section of the agent configuration file under the key Continua.Builds.AgentWorkspacePath. e.g.

<add key="Continua.Builds.AgentWorkspacePath" value="C:\CI_AWS"/>

j) After installation, the Continua CI Server service should automatically be started up. It will now need to be shutdown in the Services app before restoring the database.

k) Before restoring the database, we need to make sure that the new installation has the correct encryption keys:

Open the new server configuration file at C:\Program Files\VSoft Technologies\ContinuaCI\Server\Continua.Server.Service.exe.config in a text editor and copy the values for the following keys from the appSettings section of your backup of the server configuration file to the new file.

<add key="Continua.HashSalt" value="******"/>
<add key="Continua.SymmetricEncryptionKey" value="******"/>
<add key="Continua.SymmetricEncryptionVector" value="******"/>

l) As you are restoring from an old database, we recommend cleaning out all the new database tables first.

To do this, first install pgAdmin4. Run this, and connect to the PostgreSQL server using the connection details in the hibernate-configuration section of the new server configuration file, under <property name="connection.connection_string">

Open the Query Tool from the Tools menu and run each of the following commands:

DROP DATABASE "ContinuaCI";

CREATE DATABASE "ContinuaCI";

m) To restore the database backup:

Open a Command Prompt, navigate to C:\Program Files\VSoft Technologies\ContinuaCI\Server\PostgreSQL\bin and run

psql.exe -h localhost -p 9001 -U postgres ContinuaCI < C:\backups\ContinuaCI.bak

n) Finally, restart the Continua CI Server service, navigate to the Continua CI website and check that everything works as before.

Please let us know how this goes and whether you encounter any issues.

1 Like