简体   繁体   English

DropBox 作为版本控制和异地备份

[英]DropBox as Version Control and Offsite Backup

After reading Michael Lopp's book "Being Geek," I started using Dropbox as a means of synchronizing files between my home computer and work computer.在阅读了 Michael Lopp 的书“Being Geek”之后,我开始使用 Dropbox 作为一种在我的家用计算机和工作计算机之间同步文件的方法。 It's been fantastic, it really makes it painless to keep track of the latest version of files you're working on.这太棒了,它真的让跟踪您正在处理的文件的最新版本变得轻松。

My question has to do with people's experience with this tool, especially programmers who may have used it to develop larger projects.我的问题与人们使用这个工具的经验有关,尤其是那些可能用它来开发更大项目的程序员。

Right now, I see 3 main uses of Dropbox:现在,我看到了 Dropbox 的 3 个主要用途:

1. synchronize files between home and work computers
2. version control (you have to log into the dropbox site to access previous versions)
3. off-site backup

Right now I'm using it as my main backup tool, which I'm not sure is a good idea.现在我用它作为我的主要备份工具,我不确定这是一个好主意。 But right now I have a local (working) copy of my entire project "checked out" on each computer (my home laptop and my work computer), and additionally, my entire project is kept on the dropbox site.但是现在我在每台计算机(我的家用笔记本电脑和我的工作计算机)上“签出”了整个项目的本地(工作)副本,此外,我的整个项目都保存在 Dropbox 站点上。 So I'm thinking, if anything happens to one of my computers, or both, I'll still have that off-site backup available and I'll simply have to reinstall dropbox to access all my files.所以我在想,如果我的一台计算机或两者都发生任何事情,我仍然可以使用该异地备份,我只需重新安装 dropbox 即可访问我的所有文件。

Does anyone have experience with doing this?有没有人有这样做的经验? Has anyone done a major file recovery using dropbox?有没有人使用 Dropbox 进行过主要文件恢复? Or is this even widely used?或者这甚至被广泛使用? Thanks for your feedback in advance.提前感谢您的反馈。

Using Dropbox to maintain several files and its associated metadata when those files are historized in a VCS is always a bit tricky because of potential corruption issue (if one of those metadata part of the repository isn't correctly synchronized, you can end up with a non_working repo)当这些文件在 VCS 中被历史记录时,使用 Dropbox 维护多个文件及其相关元数据总是有点棘手,因为潜在的损坏问题(如果存储库的其中一个元数据部分未正确同步,您最终可能会得到一个非工作回购)

That is why I always use with DropBox:这就是为什么我总是使用 DropBox:

  • a DVCS (like Git): I can work directly in a working tree within a DropBox repo or I can clone said repo anywhere else outside the DropBox if I need to, DVCS(如 Git):我可以直接在 DropBox 存储库中的工作树中工作,或者如果需要,我可以将所述存储库克隆到 DropBox 之外的任何其他位置,
  • a single bundle file to which I can push at any time the changes from my local repo, wherever that repo might be.一个单独的捆绑文件,我可以随时将本地存储库中的更改推送到该文件中,无论该存储库在哪里。

That way, the only file that really need to be in sync in DropBox is that unique bundle file (representing a bare repo as one file).这样,在 DropBox 中真正需要同步的唯一文件是唯一的捆绑文件(将一个裸仓库表示为一个文件)。

See " Git with DropBox " for more.有关更多信息,请参阅“带 DropBox 的 Git ”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM