关于备份程序的基本软件设计问题。在 D

发布于 2024-10-16 20:24:13 字数 510 浏览 3 评论 0原文

对于一些 Webhost 问题,我必须为服务器领域的通用操作系统(Windows/Linux)编写一个文件备份/同步工具。大多数 Linux 根服务器提供 ssh 接口以进行安全通信,因此我可以使用 SSH 文件传输协议,但 Windows 端(即时)的最佳解决方案是什么? 我在这里写的而不是在管理或 Windows 堆栈中是否有好的 D 库(或 C 替代品)

,因为有一个原因:现有的库很重要。因此,简单的实现比接口或协议的存在更重要。优先考虑的是简单性和语言特性,而不是可能性。

总而言之,我正在寻找一种简单的方法来实现独立于操作系统的文件交换工具。对于同步工作,必须能够访问一些文件信息(上次写入时间、修改时间、文件大小等)

编辑:同步工具的“我的版本”应该在新系统上工作,而无需安装额外的软件(可能是某些通过 ssh-windows-equivalent 自动安装 [如果有的话]) 您只需输入您的访问数据,它就应该可以工作。此外我还需要一个协议,这是最大的问题。因为 ssh 不能在 Windows 上运行 - 有等效的吗?

For some Webhost issues I have to write a file backup/syncronisation tool for a common OS in the server sector (Windows/Linux). Most Linux root-servers offers the ssh-interface for secure communication so I could use the SSH File Transfer Protocol, but what's the best solution on the windows side (on the fly) ? And are there good D libraries (or C alternatives)

I'm writing here and not in the admin or windows stack because there is one reason: It's important that there are existing libraries. So an easy implementation is more important than the existence of an interface or protocol. The simplicity and the language features and not the possibilities have priority.

All in all I am looking for an easy way to implement an os independent tool for a file exchange. For the synchronisation work it has to be possible to access some file information ( last write time, modified time, filesize, etc.)

edit:"My Version" of a synconisation tool should work on a new system without extra sotfware installation (maybe some automated installation over ssh-windows-equivalent [if there is one])
You only enter your access data and it should work. Furthermore I also need a protocol and this is the biggest problem. Because ssh doesn't work on windows on the fly - is there an equivalent?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笙痞 2024-10-23 20:24:13

rsync 是一种流行的文件同步工具,最适合添加文件、删除或扩展。它已经过很好的调试并且设置起来非常简单。 (rsync -avzP username@hostname:/path/to/source/ /path/to/dest/rsync -avzP /path/to/source/ username@hostname:/path/ to/dest/ 很常见。)

rsync 经常通过 ssh 进行隧道传输;如果你不介意它公开的话,它确实有自己的协议。

但是,如果您有大量数据被稍微移动或频繁重命名,则可以使用 git< 之类的工具/code>可以更好地利用带宽。它确实存在保留双方历史记录的缺点,这可能会降低磁盘效率,但如果您的带宽不太惊人,它可以弥补这一点。

git 也经常通过 ssh 进行隧道传输;如果您不介意它公开的话,它还有自己的协议。

我怀疑其中任何一个都有 D 库绑定,但 C 绑定应该很容易获得。 :)

rsync is a popular file synchronization tool, best suited to files being added, deleted, or extended. It's been very well debugged and is quite simple to set up. (rsync -avzP username@hostname:/path/to/source/ /path/to/dest/ or rsync -avzP /path/to/source/ username@hostname:/path/to/dest/ are common.)

rsync is frequently tunneled over ssh; it does have its own protocol if you don't mind it being publicly open.

But if you've got a lot of data that is being slightly moved, or frequent renames, a tool like git can make much better use of bandwidth. It does carry the downside of keeping history on both sides, which might be less disk-efficient than you'd like, but it can more than compensate if your bandwidth is a bit less amazing.

git is also frequently tunneled over ssh; it also has its own protocol if you don't mind it being publicly open.

I doubt either one has D library bindings, but C bindings ought to be easy to come by. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文