Cannot backup external database after TeamCity upgrade

Hello,

I made a backup of my TeamCity 2017.1 version before trying to install the 2017.2 version under linux.

I unpacked the archive to the location where TeamCity was previously installed and copied my external database driver in .BuildServer/lib/jdbc.

Then I ran the cmd:

sudo ./maintainDB.sh restore -A /opt/JetBrains/TeamCity/.BuildServer -F /opt/JetBrains/TeamCity_Backup_Before_2017_2_Upgrade_20171128_160152.zip

and had this error :

Command line arguments: restore -A /opt/JetBrains/TeamCity/.BuildServer -F /opt/JetBrains/TeamCity_Backup_Before_2017_2_Upgrade_20171128_160152.zip
Using TeamCity data directory: /opt/JetBrains/TeamCity/.BuildServer
Restoring from backup file: /opt/JetBrains/TeamCity_Backup_Before_2017_2_Upgrade_20171128_160152.zip
Backup of TeamCity data version:
Version: 2017.1.5
Build number: 47175
Data format version: 812
Metadata format version: 3
Using implicitly specified target database settings: /opt/JetBrains/TeamCity/.BuildServer/config/database.properties
Using target database
database type: POSTGRESQL
connection string: jdbc:postgresql:///postgres
Target JDBC driver version 42.1 (PostgreSQL JDBC Driver)
Target database system version 9.5.10 (PostgreSQL)
Connected to the Target DB successfully.
Cannot proceed with 'restore' command: Target database is not empty. Found 122 tables: action_history, agent, agent_pool, agent_pool_project, agent_type and others.
Critical error has occurred during command execution.

I am quite new with TeamCity, so any help would be nice !

 

0
2 comments
Avatar
Permanently deleted user

Hello,

if you are trying to perform a full restore of TeamCity data you should use a new empty database.

 

 

0
Avatar
Permanently deleted user

Thank you.

0

Please sign in to leave a comment.