views:

2278

answers:

4

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?

A: 

I know this sounds obvious, but if I'm writing code for a living I would be sure to do a full backup weekly, with corresponding incremental backups daily.

Simple and easy recovery.

For a simple way to backup your eclipse directory and assuming your using Linux, you could use rsync.

rsync -ar <eclipse-dir> <backup-eclipse-dir>

You can put this in cron and have it backup your files automatically. It will only copy over the changed files to your backup-eclipse-dir on subsequent runs.

RC
Thanks, but I'm looking for recovery, not backup, methods.
Petteri Hietavirta
+1  A: 

I haven't been able to avoid rebuilding workspace occasionally (one or twice over several years of using eclipse). Delete the .metedata and rebuild.

Ken
A: 

If the workspace is not that big you could backup to say dropbox as a private locked folder.

Fred Grott
+1  A: 

I have some experience at recovering from eclipse when it becomes unstartable for whatever reason, could these blog entries help you?

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

also search for "cannot start eclipse" (I am a new user, I can only post a single hyperlink, so I have to just ask that you search for the second :( sorry)

perhaps those allow you to recover your workspace as well, I hope it helps.

Christopher Thomas