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

**URL:** https://www.finalbuilder.com/forums/t/upgrade-from-32-to-63-bit-version-do-i-have-to-backup-restore-the-database/6816
**Category:** Discussion
**Created:** [July 23, 2020, 10:26pm UTC](https://www.finalbuilder.com/forums/t/upgrade-from-32-to-63-bit-version-do-i-have-to-backup-restore-the-database/6816 "2020-07-23T22:26:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mjustin\_de](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/e19b73/32.png) [@mjustin\_de](https://www.finalbuilder.com/forums/u/mjustin_de)
#### Post date: [July 23, 2020, 10:26pm UTC](https://www.finalbuilder.com/forums/t/upgrade-from-32-to-63-bit-version-do-i-have-to-backup-restore-the-database/6816/1 "2020-07-23T22:26:57Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [July 24, 2020, 3:17am UTC](https://www.finalbuilder.com/forums/t/upgrade-from-32-to-63-bit-version-do-i-have-to-backup-restore-the-database/6816/2 "2020-07-24T03:17:07Z")

</div>

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:

```auto
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](https://www.finalbuilder.com/downloads/continuaci).

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.

```auto
<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.

```auto
<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.

```auto
<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.

```auto
<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.

```auto
<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.

```auto
<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](https://www.pgadmin.org/download/pgadmin-4-windows/). 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:

```auto
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

```auto
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.
