将 Git 与 200GB 的巨大存储库一起使用?
我正在考虑使用 Git 进行备份 - 我想将文件备份到外部驱动器,然后将所有内容提交到备份驱动器上。这样,如果需要,我仍然可以访问旧文件。我的备份集大约有 200 GB。
您认为 Git 可以处理这样大的存储库吗?提交仍然会相当快(我的意思是小于,比如说,1 小时)?我可能会遇到一些限制或崩溃吗?
I'm considering using Git for backup purposes - I want to backup my files to an external drive, then commit everything on the backup drive. That way, I can still access old files if needed. My backup set is about 200 GB.
Do you think Git can handle very big repositories like that? Will the commits still be reasonably fast (by that I mean less than, say, 1h)? Am I likely to run into some limits or crashes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我自己尝试过这个。不幸的是,Git 根本不会压缩非文本文件。因此,您最终会得到一个几乎与您的文件一样大的 Git 存储库,如果这些二进制文件中的任何一个最终获得版本控制,则可能会更大。
现在,如果您有几个 1 TB 驱动器,也许您不介意它占用的空间。但是,如果您不想将一半或更多的主驱动器用于备份,但确实需要一些版本控制,那么最好的解决方案可能是使用另一个程序备份二进制文件,但将文本文件隔离在其他地方并保留只是 Git 中的那些。
I tried this myself. Unfortunately, Git doesn't compress non-text files much if at all. So you'll end up with a Git repository nearly as big as your files, and probably much bigger if any of those binary files end up getting versioned.
Now if you have a couple of 1 TB drives, maybe you don't mind the space it takes up. But if you don't want to devote half or more of your main drive for backup, but you do want some versioning, the best solution might be to back up your binary files with another program, but isolate your text files somewhere else and keep just those in Git.
你可以用冰箱来存放衣服,谁阻止你呢?
如果您真的很在意效率,为什么要使用版本控制进行备份?你可以使用专门用于此类事情的东西。
我可以想到 Dropbox 作为开始。
You can use your refrigerator for keeping clothes, who's stopping you?
If you are really fussed about efficiency, why use a version control for backup? You could use something that is meant for such thing.
I can think of Dropbox for a start.