che icon indicating copy to clipboard operation
che copied to clipboard

Che upgrade from beta to RC3 release fails to detect my existing workspace

Open mjitch opened this issue 10 years ago • 14 comments

I upgraded my Eclipse Che from eclipse-che-4.0.0-beta-13-1 to RC3 release. The issue here is the new RC3 release fails to detect my existing workspace under the same base - <%userprofile%>. Creating a new workspace with the same name in the new Che also gives me error. Import option with the jsn configuration also has not worked out.

mjitch avatar Feb 18 '16 09:02 mjitch

Local configuration is stored in ${CHE_HOME}, i.e. when you get a new Tomcat (new binaries), this configuration is lost.

How did you upgrade? Just downloaded binaries or used the installer?

ghost avatar Feb 18 '16 10:02 ghost

I downloaded the zip binaries. As for the new ${CHE_HOME}, I did try copying the work and temp folders of the previous tomcat in beta to the new tomcat. But I was afraid to replace the webapps (war apps), as it would overwrite the new features of the latest release. But it didn't work out.

mjitch avatar Feb 18 '16 10:02 mjitch

/temp/local-storage/workspaces.json

If you can grab this file from your old installation and move it to the new one (same location), it should be ok

ghost avatar Feb 18 '16 10:02 ghost

Yeh, i tried pasting the contents of this json in the "Import Workspace" option of the new Che. But Che complained saying "New workspace could not be saved" error. However, let me try doing what you suggested.

mjitch avatar Feb 18 '16 10:02 mjitch

i copied the existing workspaces.json to the new location - D:\eclipse-che-4.0.0-RC3\tomcat\temp\local-storage, but I still don't see the workspace imported in the new Che - che_error2

json - { "workspacel76q0atyabqtmnai": { "id": "workspacel76q0atyabqtmnai", "name": "NewMyTWC", "owner": "che", "defaultEnvName": "NewMyTWC", "commands": [ { "name": "accesslogger", "commandLine": "mvn -f ${current.project.path} clean install package -s ${current.project.path}/../settings.xml", "type": "mvn", "attributes": { "previewUrl": "http://${server.port.8080}/${current.project.relpath}" } }, { "name": "myaccount", "commandLine": "mvn -f ${current.project.path} clean install package -s ${current.project.path}/../settings.xml -DskipTests -P myaccount -Denv.ID\u003dqa -Dencoding\u003d\"Cp1252\"", "type": "mvn", "attributes": { "previewUrl": "http://${server.port.8080}/${current.project.relpath}" } }, { "name": "rulesengine", "commandLine": "mvn -f ${current.project.path} clean install package -s ${current.project.path}/../settings.xml", "type": "mvn", "attributes": { "previewUrl": "http://${server.port.8080}/${current.project.relpath}" } } ], "projects": [ { "name": "mytwcaccount_maven", "path": "/mytwcaccount_maven", "type": "blank", "mixins": [ "git" ], "attributes": {}, "modules": [], "storage": { "parameters": {} } }, { "name": "accesslogger_maven", "path": "/accesslogger_maven", "type": "blank", "mixins": [ "git" ], "attributes": {}, "modules": [], "storage": { "parameters": {} } }, { "name": "RuleEngine_maven", "path": "/RuleEngine_maven", "type": "blank", "mixins": [ "git" ], "attributes": {}, "modules": [], "storage": { "parameters": {} } } ], "attributes": {}, "environments": { "NewMyTWC": { "name": "NewMyTWC", "machineStates": [ { "channels": { "outputChannel": "workspacel76q0atyabqtmnai:NewMyTWC:ws-machine", "statusChannel": "machine:status:workspacel76q0atyabqtmnai:ws-machine" }, "isDev": true, "name": "ws-machine", "type": "docker", "source": { "type": "recipe", "location": "http://localhost:8080/ide/api/recipe/recipe_ubuntu/script" }, "limits": { "memory": 3500 } } ] } }, "isTemporary": false, "status": "RUNNING" } }

mjitch avatar Feb 18 '16 11:02 mjitch

Sorry, we have changed workspace model, and workspaces created in beta are incompatible in RC-x releases.

ghost avatar Feb 18 '16 11:02 ghost

Oh, that's a big blow!!!

mjitch avatar Feb 18 '16 11:02 mjitch

Well, it was beta, and some work was going it, and we completed it in RC release.

ghost avatar Feb 18 '16 14:02 ghost

Ok...In this case, since the <%userprofilfe%> remains the same and the workspace location is the same, then why the new Che fails to detect it?

mjitch avatar Feb 19 '16 05:02 mjitch

Workspace location remains the same, but there's no workspaces local database i.e. you do not have any jsons in /tomcat/temp/local-storage.

What should be done to avoid losing data when upgrading:

  1. set CHE_LOCAL_CONF_DIR to point to a permanent location on your Win file system
  2. create che.properties file in that directory
  3. che.conf.storage=C:\\Users\\user\\che-conf this is an example. Point it to any location of choice. Double \ are mandatory!
  4. Re run Che.

Now, your configuration will be saved to a permanent location and new Che versions will use it.

ghost avatar Feb 19 '16 08:02 ghost

Updated docs - https://eclipse-che.readme.io/v4.0/docs/configuration#workspace-and-project-storage

ghost avatar Feb 19 '16 14:02 ghost

@mjitch I am closing the issue. Feel free to reopen if instructions listed in docs do not work on your system

ghost avatar Feb 21 '16 06:02 ghost

@eivantsov ...I have reset following properties as described in the document. But i still do not see any effect -

`#che.user.workspaces.storage=${che.home}/workspaces che.user.workspaces.storage=C:\Users\manjit.s\AppData\Local\Eclipse Che\vfs

#che.conf.storage=${catalina.base}/temp/local-storage che.conf.storage=D:\eclipse-che-4.0.0-RC3\tomcat\temp\local-storage`

mjitch avatar Feb 22 '16 06:02 mjitch

Finally, import happened! I had to paste the contents of the existing workspace.json to the "Import Workspace" option in the IDE and save the new worskpace with the existing name.

mjitch avatar Feb 22 '16 07:02 mjitch