Eclipse 工作区备份
如果在备份 Eclipse 工作区时跳过 .metadata/
目录,我会丢失什么? (是否有一些文档描述 Eclipse 在该目录中存储的内容)?我注意到它经常变化(基本上每次我使用 Eclipse (Galileo) 时。
我已经看到了这个 问题,但我对备份插件和设置不感兴趣(也是因为我不确定它们在重新安装我的插件后恢复时能否正常工作) PC 或新 PC 上)我只是对备份我的项目(源代码、库、可能的数据、.svn
和 .git
感兴趣)。那么,我可以安全地忽略 .metadata/
目录吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您通常不想备份 .metadata 目录,因为它的内容不可移植。当您创建新工作区并重新导入项目时,您会注意到工作区首选项将丢失(在“窗口”->“首选项”下设置的内容)。从代码风格首选项到目标运行时的路径变量。通过记录如何配置工作空间首选项来降低风险,并且恢复不会有任何问题。某些首选项(例如用户拼写词典和代码样式)允许您引用外部文件。利用这一点并将这些文件放入将要备份的目录中。
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.
是的。当您从源代码存储库创建新项目时,Eclipse 将创建一个新的 .metadata 目录。
Yes. Eclipse will create a new .metadata directory when you create a new project from your source code repository.