Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse workspace backup

Tags:

eclipse

backup

What do I lose if I skip the .metadata/ directory when doing the back-up of my Eclipse workspace? (Is there some documentation describing what Eclipse stores in this directory)? I've noticed that it changes very often (essentially every time that I use Eclipse (Galileo).

I've seen this question, but I'm not interested in doing a back-up of plug-ins and settings (also because I'm not sure that they would work properly when restored after a re-installation of my PC or on a new PC). I'm just interested in doing a back-up of my projects (source code, libraries, possible data, .svn and .git directories). So, can I safely ignore the .metadata/ directory?

like image 810
MarcoS Avatar asked Jan 11 '11 13:01

MarcoS


2 Answers

You do not generally want to backup .metadata directory because its content is not portable. When you create a new workspace and re-import your projects, you will notice that your workspace preferences will be missing (stuff set under Window -> Preferences). Everything from code style preferences, to path variables to target runtimes. Mitigate your risk by keeping good notes on how you configure your workspace preferences and you will have no problem recovering. Some preferences (like user spelling dictionary and code style) allow you to reference external files. Take advantage of this and put those files in a directory that will be backed up.

like image 111
Konstantin Komissarchik Avatar answered Sep 24 '22 15:09

Konstantin Komissarchik


So, can I safely ignore the .metadata/ directory [in an Eclipse workspace backup]?

Yes. Eclipse will create a new .metadata directory when you create a new project from your source code repository.

like image 31
Gilbert Le Blanc Avatar answered Sep 23 '22 15:09

Gilbert Le Blanc