Last updated: 2006-07-13
Your workspace is corrupt and Eclipse won't start. You don't know what happened...you got an OutOfMemoryError, you ran out of disk space, your dog was playing with the power switch on the CPU. All you know is that you have a lot of projects in your (now corrupt) workspace and you don't want to re-build your workspace from scratch.
Now the Platform/Core team offers this utility plug-in which can perform the basic restoration of your workspace. We cannot restore all metadata, but we will attempt to re-create your projects in your workspace.
Please note that this utility only re-builds workspaces which were created in Eclipse 2.0 and later. Restoration of workspaces from Eclipse 1.0 will not work. This version of the restorer must be run using Eclipse 3.0 or greater.
Download the zip file from the web site and extract it to theplugins
directory of your install. For instance:unzip org.eclipse.core.tools.restorer_3.0.0.zip -d /home/eclipse/plugins
The workspace re-builder operates in-place. To start it you only have to set the -application argument.
Note if you currently start Eclipse with a shortcut specifying your workspace (via -data) then you must supply this as well.
eclipse -application org.eclipse.core.tools.restorer.application
eclipse -application org.eclipse.core.tools.restorer.application -data myworkspace
Each plug-in which contributes a restorer will have a copy of their old metadata directory as a backup. So if you had a metadata area on disk which looked like the following:
workspace
.metadata
.plugins
org.eclipse.core.resources
org.eclipse.jdt.core
org.eclipse.uiThen it will look like this after you run the restorer with the default resources plug-in fragment:
workspace
.metadata
.plugins
org.eclipse.core.resources
org.eclipse.core.resources.<timestamp>
org.eclipse.jdt.core
org.eclipse.ui
The corrupt data is in the
org.eclipse.core.resources.<timestamp
> directory.
What it restores:
- the basic state of all your projects that you had in your old workspace
What it doesn't restore:
- your workbench preferences
- bookmarks, tasks, problems, and other markers
- repository synchronization information from your shared projects
- other plug-in specific metadata
The key point to remember when writing a workspace restoration contributor is the fact that we are trying to restore a corrupt workspace. We don't know what caused the workspace to become corrupt nor do we know which files in the metadata are corrupt. Attempts should be made to verify that metadata files are in working order and no assumptions should be made about the validity of any files on disk.
Our plug-in offers an extension point where plug-ins can contribute their own restorers. The stand-alone utility will create your projects for you, and then other plug-ins can re-create any state that they know about. Future work includes working with other teams to get their restorers working, as well as improving the one provided for theorg.eclipse.core.resources
plug-in so it will restore markers, sync info, and persistent properties.
Comments and questions can be directed to the platform-core-dev@eclipse.org mailing list. Complaints and bug reports can be directed to the Bugzilla database on eclipse.org against the Platform/Core component.
This plug-in is provided to the user to use at their own risk. No guarantees are made that the workspace will be able to be restored but if its corrupt then it can't get any worse!