跨多台服务器同步文件 [英] Synchronizing Files Across Multiple Servers

查看:53
本文介绍了跨多台服务器同步文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在场环境中,是否有一种首选技术可以使在一台服务器上创建/更新/删除的文件与场中的所有其他服务器保持同步?例如,如果一个文件是由服务器 A 上的用户创建的,而该文件是由服务器 B 上的用户请求的,那么确保该文件可同时在两台服务器上访问的最佳方法是什么?相同的答案是否适用于场中的许多(1,000 多台)服务器?

In a farm environment, is there a preferred technique for keeping files created/updated/deleted on one server in sync with all of the other servers in the farm? For example, if a file is created by a user on Server A, and that file is requested by a user on Server B, what is the best way for ensuring that the file is accessible on both servers, simultaneously? Does the same answer apply for many (1,000+) servers in a farm?

虽然我的特定问题主要适用于 Windows 服务器,但最好平台几乎没有区别.

Although my particular question applies mainly to Windows servers, it is preferred that the platform make little to no difference.

推荐答案

您可以使用内置于服务器操作系统中的分布式文件系统 (DFS).我这样做是为了实现类似的目标.

You could use Distributed File System (DFS), which is built into the Server OS. I've done this to accomplish a similar goal.

本质上,您将 DFS 配置为创建一个根,它实际上只是一个 URI.您可以创建看起来像共享的 \\DOMAIN\SHARE,尽管它是虚拟的.DFS 利用域的 DNS 将其显示为有效位置.在根目录中,您可以创建链接,这些链接只是指向任意数量服务器上的物理文件共享的路径.这些相当于根目录下的子目录.最后,对于每个链接,您可以创建多个目标.在您的示例中,它将是每台机器上的共享.然后,DFS 将使用文件复制服务跨所有列为目标的路径复制这些共享中的文件.

Essentially, you configure DFS to create a root, which is really just a URI. You might create \\DOMAIN\SHARE which looks like a share, although it is virtual. DFS leverages the domain's DNS to present it as a valid location. Within the root, you might create links which are just paths to physical file shares on any number of servers. These would be the equivalent of subdirectories under your root. Finally, for each link, you can create multiple targets. In your example, it would be a share on each of the machines. DFS will then replicate files in those shares across all paths listed as targets, using the File Replication Service.

它适用于我跨越的两台服务器.我不知道复制到 1000 多台服务器时它的扩展性如何.这是一个企业级解决方案,但我不确定机器数量在管理上是否可行.因为您是跨机器,所以您可能不需要以这种规模进行复制,而是将其用作服务,就像它的抽象一样.路径是一个常数.

It works very well for the two servers I have it spanning. I don't know how well it would scale when replicating to 1000+ servers. It's an enterprise level solution, but I'm not sure that number of machines would be administratively viable. Because you are spanning machines, you probably wouldn't need to replicate at that scale, but rather use this as a service, like the abstraction that it is. The path is a constant.

其他注意事项:您必须安装文件复制服务.我认为您还需要一个域环境才能真正完成这项工作.

Other caveats: you have to have the File Replication Service installed. I think you'd also need a domain environment to really make this work.

这篇关于跨多台服务器同步文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆