Unable to restore just the Configuration from backup using the -C command.
Guys,
We're trying to set up a new backup server where we want to keep our configuration in sync with our main TC server.
The way that we're trying to do is is to take a full backup (Config, DB, logs, etc) from the main server (currently on TC 8.0.6)
Then do a restore of JUST the Configuration data on our backup server (currently on 8.1.0a)
Thing is the -C flag does not seem to work.
We're executing the following command:
C:\TeamCity\bin\maintainDB.cmd restore -F "C:\BLD-MSTR-01-Backup-20140225_142403.1.zip" -T "C:\database.properties" -C
C:\TeamCity\logs\teamcity-maintenance.log stated the following (no mention of restoring config files under C:\ProgramData\JetBrains\TeamCity\config)
================================================================================================================
[2014-02-26 11:07:51,777] INFO - Command line arguments: restore -F "C:\BLD-MSTR-01-Backup-20140225_142403.1.zip" -T "C:\database.properties" -C
[2014-02-26 11:07:51,807] INFO - TeamCity Data Directory path is determined using the environment variable TEAMCITY_DATA_PATH
[2014-02-26 11:07:51,839] INFO - Using TeamCity data directory: C:\ProgramData\JetBrains\TeamCity
[2014-02-26 11:07:51,840] INFO - Restoring from backup file: C:\BLD-MSTR-01-Backup-20140225_142403.1.zip
[2014-02-26 11:07:52,423] INFO - Backup created by TeamCity version:
Version: 8.0.6
Build number: 27767
Data format version: 628
[2014-02-26 11:07:52,432] INFO - Starting restore
[2014-02-26 11:07:52,433] INFO - Opening zip file: C:\BLD-MSTR-01-Backup-20140225_142403.1.zip
[2014-02-26 11:07:52,517] INFO - Importing Supplementary Data
[2014-02-26 11:07:52,525] INFO - Finishing
[2014-02-26 11:07:52,526] INFO - Restored 14 files.
[2014-02-26 11:07:53,433] INFO - Restoring finished successfully
[2014-02-26 11:07:53,452] INFO - The database was restored using the following properties file:
C:\ProgramData\JetBrains\TeamCity\config\database.mssql.properties
If you are going to start TeamCity with the database just restored,
don't forget to copy this file to
C:\ProgramData\JetBrains\TeamCity\config\database.properties
================================================================================================================
We're able to do the FULL restore without the -C command (NOT WHAT WE WANT)
Full restore works as long as we wipe the following directories:
C:\ProgramData\JetBrains\TeamCity\config
C:\ProgramData\JetBrains\TeamCity\system
and move over database.properties file under another location like drive C:\ (recomended manual steps?)
This is what needs to be done for the full restore according to http://devnet.jetbrains.com/message/5510363#5510363
Please advise on how to proceed ASAP we would really like to be able to use the -C flag to just restore the config data.
At this time it seems like something is wrong with the way maintainDB.cmd is behaving with the -C flag.
Thanks
~ Alex
Please sign in to leave a comment.
Hello, Alex.
maintainDB really does not work with -C option in 8.1.
I have created an issue http://youtrack.jetbrains.com/issue/TW-35375. It will be fixed ASAP.
Try -C -U set of options as a workaround.
Sorry for inconvenience.
Thanks for a prompt response Inna.
It worked!
Just to confirm is deleting config, system folders and moving database.properties off to a different location are recomended steps before a full/partial restore?
Thanks
~ Alex