How to recover damaged Eclipse workspace?

I just managed to corrupt the contents of my Eclipse directory. metadata. Starting with eclipse -clean did not work. Removing metadata and then importing all projects, plugins and settings is not very interesting. I ended up moving .metadata / .plugins / org.eclipse.core.resources / elsewhere and re-importing only my projects.

Are there any tools or best methods for restoring the workspace?

+49
eclipse recovery corrupt workspace
Jun 04 '09 at 13:08
source share
14 answers

I have experience recovering from an eclipse when it becomes impractical for any reason, can these blog entries help you?

http://blog.chris-alex-thomas.com/2009/08/26/eclipse-refuses-to-start-again/

also search for "can not start eclipse" (I am a new user, I can only post one hyperlink, so I just need to ask what you are looking for the second :( sorry)

perhaps it also allows you to restore the workspace, I hope this helps.

+10
Jul 12 '10 at 8:50
source share

When the workspace is damaged and Eclipse cannot start, even using the -clean deleting a single workspace/.metadata/.plugins/org.eclipse.core.resources/.snap can help (source: comments on article http: // letsgetdugg .com / 2009/04/19 / recovering-a-corrupt-eclipse-workspace / ).

Update: when Eclipse 4.X cannot start after a crash, try starting with the -clearPersistedState option; if this does not help, then delete the file workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi (sources: http://www.eclipse.org/forums/index.php/m/1269045/ http://www.eclipse.org/forums/index.php/t/522428/ https://bugs.eclipse.org/bugs/show_bug.cgi?id=404873 ). Note: you will lose the configuration of your perspective / views / tabs.

Update. The disruptive plugin may be responsible for running Eclipse with corrupted metadata. If you have the Subversive plugin installed, update it to the latest build (at least 0.7.9.I20120210-1700) with update-site . The related errors 372621 and 370374 were fixed by the Subversive developers.

+95
Feb 27 2018-12-12T00:
source share

After deleting the following file, you can start your workspace: .metadata.plugins \ org.eclipse.e4.workbench \ workbench.xmi, as shown here :

+15
Apr 7 '14 at 17:01
source share

I was not able to periodically restore the workspace (once or twice in several years of using the eclipse). Remove .metedata and rebuild.

+4
Jun 04 '09 at 13:25
source share

I successfully restored my existing workspace from a completely confused situation (all kinds of core components providing NPE and ClassCastExceptions, etc.) using this procedure:

  • Open eclipse
  • Close error dialog
  • Select the first project in the workspace
  • Right Click -> Update
  • Close error dialog
  • Close eclipse
  • Close error dialog
  • Repeat for all projects in the workspace
  • (if your projects are in CVS / SVN, etc., synchronize them)
  • Clean and rebuild all projects
  • Fixed

This whole procedure took me half an hour for a large workspace, but in the end to fix it.

+3
Nov 10 2018-10-10
source share

This thread might be a little older, but since it's still a problem these days, I thought Id was offering a new Eclipse backup solution.

  • At http://profiles.yatta.de you can download the Yatta Eclipse Launcher. You can use it to save the Eclipse settings and workspace.

  • Once installed, Launcher will open your existing Eclipse installations and workspaces.

  • Click the Download and Submit button (blue) to the right of the entry you want to create.

(You won’t even "share" your Eclipse or workspace with anyone. You just upload the installation file with your metadata, which you will have only one access to. You can share it later, but you can also just use it in as backup).

If you do, you can quickly set up your IDE if you ever have a fragmented workspace or an Eclipse installation.

+3
May 02 '16 at 9:19
source share

Another solution that I discovered by chance, and may help someone:

  • Back up the damaged workspace.
  • Move half of your projects to some temporary place.
  • Launch Eclipse, if it works, go to step 5.
  • Move half of the projects that you deleted back to the workspace, move the other half. If you have already done this, continue to delete / read your projects in binary search . Go to step 3.
  • Close Eclipse, return all your projects and run it again. You should now see that some of your projects are closed (and in the wrong working sets). Reopen your projects and move them to the correct working sets.

In my case, it was a project that was damaged, and not the entire workspace (an attempt to import the specified project into a new workspace also led to its failure). So, I started looking for a faulty project - instead, I got the result described above.

+2
Mar 02 2018-12-12T00:
source share

I know this sounds obvious, but if I write the code for life, I would definitely make a full backup weekly weekly daily daily incremental backup.

Simple and easy recovery.

For easy backup of the eclipse directory and when using Linux, you can use rsync.

rsync -ar <eclipse-dir> </ L; backup-eclipse-dir>

You can put this in cron and automatically back up your files. It will only copy the changed files to the backup-eclipse-dir file on subsequent launches.

+1
Jun 04 '09 at 13:18
source share

If the workspace is not so large, you can make a backup to tell dropbox as a private folder.

0
Jun 04 '09 at 13:28
source share

None of this helped me. But actually it worked with deleting all * .snap files from my workspace. It also saves almost all settings, including imported projects. Be sure to back up your workspace before trying to do this.

0
May 09 '13 at 15:59
source share

Delete the file with the extension .dat in the workspace /.metadata/.plugins/org.eclipse.wst.jsdt.core/ and then close eclipse, you may not be able to close the eclipse by pkill -f eclipse if you are on Linux or similar.

This solution avoids importing all existing projects.

0
Sep 17 '13 at 7:10
source share

I also had this problem: my workplace was damaged and no longer did all the important things.

For some reason, I had a corrupt resource in one of my projects. It did not appear in the package tree, but it appeared in the error log in Eclipse as

Error creating link for external folder X: \ somefolder

After checking each project (because the error did not point to one), I really found this resource in one of the build paths (in the Configure Build Path menu, where it displayed the error icon!) And deleted it.

See Eclipse (Kepler) workspace acting weird (hierarchy type, link search does not work) for a more detailed description of my problem if you experience something similar.

Sent for future developers.

0
Dec 20 '13 at 9:19
source share

In my case, only deleting the org.eclipse.e4.workbench directory (under .metadata/.plugins ) and restarting Eclipse solved the problem.

0
Sep 13 '14 at 5:39
source share

Deleting the file below helped me solve the problem of starting eclipse. The Perforce plugin has always bothered me, especially when my machine reboots, and the next time the eclipse tries to restore workspace and crap.

Workspace /.metadata/.plugins/org.eclipse.core.resources/.snap

For reference, the error I received was: org.eclipse.core.runtime.CoreException: the com.perforce.team.ui plugin could not load the com.perforce.team.ui.UITeamProvider class.

0
Sep 16 '14 at 4:37
source share



All Articles