Eclipse workspace backup

对着背影说爱祢 提交于 2020-01-10 05:06:53

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4657884/eclipse-workspace-backup

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!