Many binary files synchronization

ぃ、小莉子 提交于 2019-12-02 00:16:39

问题


I have about 100 000 files on office server (images, pdf's, etc...) Each day files count grows about 100-500 items, and about 20-50 old files changes.

What is the best way to synchronize Web-server with these files? Can any system like Mercurial, GIT help? (On office server, I'll commit changes, and web-server periodically do updates)?

Second problem is, that on Web-server I have user-generated-content (binary-files) (other files). Each day this users upload about 1000-2000 new files. Old files don't change. And I need to backup these files to local machine. Can any system like Merurial, GIT help in this situation? (On web-server I'll commit these files by cron, and on local machine I'll do updates)

Thanks

UPD.

Office server is Windows Server 2008 R2 Web-server is Debian 5 lenny


回答1:


The simplest and most reliable mechanism (in my experience) is rsync.

On Windows, however, rsync over ssh is badly broken due to issues with how Cygwin interacts with named pipes. Rsync over its own protocol works (as long as you don't care about encryption), but I've had lots of problems getting rsync to stay up as a Windows service for more than a few days at a time. DeltaCopy is a Windows app that uses the rsync tools behind the scenes; it seems to work very well, though I haven't tried the ssh option.




回答2:


A DVCS is not a good solution in this case: it will keep the all history, which you don't always need, and will make any clone a massive operation.

An artifact repository like Nexus is much more adapted if you need some kind of versioning with integrity check associated with your binaries.
Otherwise (no versioning), a simple rsync like Marcelo proposes is enough.



来源:https://stackoverflow.com/questions/4968745/many-binary-files-synchronization

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