Hi,
We have recently noticed that the system drive of our Continua Server is almost full.
To somewhat help with this we want to migrate Continua’s PostgreSQL DB to another drive. Is it safe to do so? And is there anything we need to change about our Continua configuration if we do this?
This is the database that was installed as part of the Continua setup.
Regards,
Christoph
Hi Christoph,
You can move the PostgreSQL database but it’s not a case of simply copying the folder. I’ll put together some instructions for you tomorrow.
Meanwhile it may be worth deleting some of the database backups named (Continua_PG_0_0_YYYMMDD-hhmm.sql) located in the folder: C:\ProgramData\VSoft\ContinuaCI. A backup is created every time Continua is installed and this could be the reason you are running out of space.
Thanks for taking the time. We already cleaned the backups so we cannot get any more disk space out of that sadly.
Hi Christoph,
The easiest way to move the PostgreSQL database is to create a junction point:
- Stop Continua CI Server service
- Stop ContinuaCIPostgreSQL service
- Move the C:\ProgramData\VSoft\ContinuaCI\PostgeSQLDB to your new destination e.g. X:\My New PostgreSQLDB
- Create the junction point by opening a command prompt and typing >
mklink /j C:\ProgramData\VSoft\ContinuaCI\PostgeSQLDB "X:\My New PostgreSQLDB Folder"
- Start ContinuaCIPostgreSQL service
- Start Continua CI Server service
Note that it is also possible to change to location for the PostgeSQLDB data directory by editing a registry key for the ContinuaCIPostgreSQL service, however our installer does not take this into account and you will have problems next time you install Continua.
Another option is to install a separate PostgreSQL server http://www.enterprisedb.com/product...d#windows. Continua currently includes version 9.3.4 - it has not been tested with later versions but should at least work with 9.3.6.
- Install PostgreSQL (use a port other than 9001 used by the Continua PostgreSQL). Note the port number and password.
- Stop Continua CI Server service
- Take a note of the connection details for the original Continua PostgreSQL database in C:\Program Files\VSoft Technologies\ContinuaCI\Server\Continua.Server.Service.exe.config under hibernate-configuration\session-factory\property name="connection.connection_string"
- Open a command prompt and navigate to the bin folder under where you installed the new PostgreSQL e.g. C:\Program Files\PostgreSQL\9.3\bin
- Run this to create the database
createdb -h localhost -p {new port number} -U postgres -e ContinuaCI
- Run this to copy the database to the new server
pg_dump -C -h localhost -p 9001 -U postgres ContinuaCI | psql -h localhost -p {new port number} -U postgres ContinuaCI
- Run the latest Continua CI installer. Choose "I want to update my existing settings". When you get to the Database page, tick "Use own Postgres install". Click build connection string. Enter the correct port and password for the new server. Edit the connection string and change "Initial Catalog" to "Database" (yes - we need to fix this!)
- Finish running the installer.
- The service should now be running using the new database. You can now shut-down the ContinuaCIPostgreSQL service and archive the folder C:\ProgramData\VSoft\ContinuaCI\PostgreSQLDB.
Hope this helps - let me know if you run into any problems
Creating the junction point worked fine. Thanks.