问题描述
对于与我正在从事的项目(源代码,文档等)相关的任何事情,我都会大量使用源代码控制,而我从来没有那样丢失任何东西.
I make extensive use of source control for anything that relates to a project I'm working on (source, docs etc.) and I've never lost anything that way.
但是,我的开发机器上发生了两到三次崩溃(在过去4年中有所蔓延),迫使我重新安装系统并重新配置了应用程序(eclipse,vim,Firefox等).重新安装后的几周里,我缺少一个或另一个小应用程序,而某些PHP或Python模块不存在,诸如此类.
However, I have had two or three crashes (spread over the last 4 years) on my development machine that forced me to reinstall my system and reconfigure my apps (eclipse, vim, Firefox, etc.). For weeks after reinstalling, I was missing one little app or another, some PHP or Python module wasn't there, stuff like that.
虽然这不是致命的,但它很烦人并且浪费时间.因为它似乎很少见,所以我没有为实际的解决方案而烦恼,但与此同时,我已经形成了一种心态,即我不希望再发生这种事情.
While this is not fatal, it's very annoying and sucks up time. Because it seemed so rare, I didn't bother about an actual solution, but meanwhile I've developed a mindset where I just don't want stuff like that happening anymore.
那么,对于开发机器来说,好的备份解决方案是什么?我已阅读这个非常相似的问题 ,但是那个家伙真的想要和我不同的东西.
So, what are good backup solutions for a development machine? I've read this very similar question, but that guy really wants something different than me.
我想要的是在架子上保留备用硬盘驱动器,并将崩溃后的恢复时间减少到一个小时或更短的时间.
What I want is to have spare harddrives on the shelf and reduce my recovery time after a crash to something like an hour or less.
考虑到这一点,我认为可能还有一种方法可以使用备份机制使两个或多个开发工作站保持同步,因此我可以随时在另一台PC上继续工作.
Thinking about this, I figured there might also be a way to use the backup mechanism for keeping two or more dev workstations in sync, so I can continue work at a different PC anytime.
编辑:我应该提到
- 我正在运行Linux
- 我想要增量备份,因此经常进行备份(每天一次或两次)很便宜
RAID很好,但是我大多数时候都在笔记本电脑上,那里没有第二块硬盘,没有E-SATA,我不确定是否要RAID到USB驱动器:这真的行得通吗?
RAID is good, but I'm on a laptop most of the time, no second hd in there, no E-SATA and I'm not sure about RAIDing to a USB drive: would that actually work?
我已经看到系统管理员使用rsync,有人对此有任何经验吗?
I've seen sysadmins use rsync, has anybody had any experiences with that?
推荐答案
我将按照您喜欢的方式设置计算机,然后对其进行映像.然后,您可以设置rsync(甚至SVN)来每晚备份homedir等.
I would set up the machine how you like it and then image it. Then, you can set up rsync(or even SVN) to backup your homedir nightly/etc.
然后,当计算机死机时,您可以重新映像,然后重新部署主目录.唯一的问题是升级/新软件,但要完全解决的唯一方法是对驱动器进行每晚的完整备份.
Then when your computer dies, you can reimage, and then redeploy your home dir.The only problem would be upgraded/new software, but the only way to deal completely with that would be to do complete nightly backups of your drive(s).
谢谢,这听起来像是个好建议.我认为应该也可以定期更新映像(以获取软件更新/安装),但可能不那么频繁.例如我可以在VM中启动映像并执行全局软件包更新或其他操作.
Thanks, this sounds like a good suggestion. I think it should be possible to also update the image regularly (to get software updates / installs), but maybe not that often. E. g. I could boot the image in a VM and perform a global package update or something.
饭能
这篇关于备份(或同步)开发计算机的好方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!