Prior to wiping a server I ran a backup up my TC 8.x version as it had about 40 or so projects on it. This created about 7mbs of data to a .zip file. I used the backup tool from admin panel.
I am now trying to restore on a brand new install. Using internal database right now. I tried following obscure instructions here https://confluence.jetbrains.com/display/TCD8/Restoring+TeamCity+Data+from+Backup but failed.
I am trying to do this from powershell script as the error i keep getting is that the JAVA_HOME and JRE_HOME variables are not installed.
I can see however in my environment variables (my compputer > advanced > environment variables) both the JAVA_HOME and JRE_HOME vars pointing to c:\teamcity\jre\bin and c:\teamcity\jre.
Default install of teamcity 8.1.5.
data dir = c:\programData\jetbrains\teamcity
app dir = c:\teamcity
copied the template ( .BuildServer\config\database.hsqldb.properties.dist) as c:\temp\database.properties
from powershell :
PS C:\> [Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\TeamCity\jre\bin", "Machine")
PS C:\> [Environment]::SetEnvironmentVariable("JRE_HOME", "C:\TeamCity\jre", "Machine")
PS C:\> C:\TeamCity\bin\maintainDB.cmd restore -F C:\Temp\TeamCity_Backup_20140730_113600.zip -A C:\ProgramData\JetBrains\TeamCity -T C:\Temp\database.properties
The error I keep getting back is the following:
Java executable is not found:
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Java executable is not found in the directories listed in the PATH environment variable
- Path to JVM is not found in Windows Registry.
- Java executable is not found in the default locations
the same error pops from a windows cmd prompt.
Can anyone explain to me what I am doing wrong. Some sources say I need to install the java SDK but the instructions make no mention of this.
Appreciate any feedback. Would really like to get my projects back.