Teamcity migration from internal DB to Postgres


Hi All,

I am trying to migrate Teamcity to external DB. The current DB has grown to size 320 MB.

Please find log below, let me know for any suggestions, how to debug this. 

[root@tc-staging1 bin]# ./ migrate -A /root/.BuildServer -T /root/.BuildServer/config/
Using logs directory /home/teamcity/TeamCity/logs
TeamCity maintenance tool. Copyright 2015 JetBrains s.r.o. All Rights Reserved.

Command line arguments: migrate -A /root/.BuildServer -T /root/.BuildServer/config/
Using TeamCity data directory: /root/.BuildServer
Using database settings from the TeamCity data directory for source database: /root/.BuildServer/config/
Using source database
database type: POSTGRESQL
connection string: jdbc:postgresql://localhost:5432/teamcitydb
Source JDBC driver version 8.4 (PostgreSQL Native Driver)
Source database system version 8.4.9 (PostgreSQL)
Cannot proceed with 'migrate' command: The source database is empty.
Critical error has occurred during command execution.
[root@tc-staging1 bin]# ./ migrate -A /root/.BuildServer -T /root/.BuildServer/config/



Prashanth L

Comment actions Permalink

I ran restore command, this works fine. Thanks.


./ restore -F /root/.BuildServer/backup/ -T /root/.BuildServer/config/ -D

Comment actions Permalink

Hi Prashanth,

Glad that the problem is sorted out!

FYI: there are some examples how to use maintainDB tool to restore database in the documentation:


Please sign in to leave a comment.