I just managed to corrupt contents of my Eclipse .metadata directory. Starting up with eclipse -clean did not work out. Deleting .metadata and then importing all projects, plugins and setting does not sound too interesting. I ended up moving .metadata/.plugins/org.eclipse.core.resources/ elsewhere and reimporting my projects only.
Are there any tools or best practices to recover workspace?
You should find something like your-eclipse-workspace\. metadata\. plugins\org. eclipse.
I copy the workspace to a USB flash memory drive, carry it home in my pocket, copy the workspace to the hard drive on my home computer, start Eclipse, and choose File->SwitchWorkspace.
When workspace is damaged and Eclipse cannot start, even using the -clean
option, removing single file workspace/.metadata/.plugins/org.eclipse.core.resources/.snap
may help (source: comments to article https://web.archive.org/web/20200517003712/https://letsgetdugg.com/2009/04/19/recovering-a-corrupt-eclipse-workspace/).
Update: when Eclipse 4.X cannot start after crash, try to start with -clearPersistedState
option; if it didn't help then remove file workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
(sources: https://www.eclipse.org/forums/index.php/m/1269045/ https://www.eclipse.org/forums/index.php/t/522428/ https://bugs.eclipse.org/bugs/show_bug.cgi?id=404873). Note: you'll lose configuration of your perspective/views/tabs.
Update: Subversive plugin may be responsible for inability to start Eclipse with corrupted metadata. If you have Subversive plugin installed, update it to latest build (at least 0.7.9.I20120210-1700) from update-site. Related bugs 372621 and 370374 were fixed by Subversive developers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With