使用S3作为存储FTP服务器 [英] FTP server using S3 as storage

查看:2373
本文介绍了使用S3作为存储FTP服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个ftp服务器(使用的Windows / Linux / MAC - 不关心),这将有它的存储作为一个亚马逊的S3存储。现在注意,S3不支持FTP本身因此这将需要某种形式的黑客作为一种解决方案。

I am trying to create a ftp server ( using windows/linux/mac - no concern) which would have its storage as a Amazon S3 storage. Now note that S3 does not support FTP natively so this would need some kind of hack as a solution.

我研究的话题,发现各种解决方案,但我没有真正相信是任何的。他们是:

I researched about the topic and found various solutions but am not really convinced be any of those. Them being:

  1. 在亚马逊EC2 + TntDrive
  2. 使用SME
  3. 创建一个EC2实例和安装FTP服务器,并安装S3本地文件系统。

我试图找到安全性和灵活性/平滑度方面的最佳解决方案。哪种解决方案,你认为是最好的,以及如何实现上述?

I am trying to find the best solution in terms of security and flexibility/smoothness. Which solution do you think is the best and how to achieve the above?

修改1:

我在下面的解决方案很感兴趣。这里是我收集:您可以将EBS卷到一个EC2实例和运行在该实例的FTP服务器。点FTP服务器连接的EBS卷,然后就FTP你的文件 - 它会被直接写入EBS卷。你可能会想使用FTP服务器和客户端,可以支持恢复中断的传输 - 例如,FileZilla中。我是正确的,当我承担所有上述的?

I am very interested in the following solution. here is what I gather : You can attach the EBS volume to an EC2 instance and run an FTP server on that instance. Point the FTP server to the attached EBS volume, then just FTP up your file - it will be written directly to the EBS volume. You would want to use an FTP server and client that can support resuming interrupted transfers - for example, FileZilla. Am I correct when I assume all of the above ?

同时任何人都可以就如何实现这一目标的一步一步的过程?

推荐答案

答案真的取决于。

首先,让我说FTP是一个可怕的,不安全的协议。请确保您有才走这路线的好理由。有大量的用户友好的S3工具。

First, let me say FTP is a terrible and insecure protocol. Make sure you have a good reason before going down this route. There are plenty of user-friendly S3 tools.

二,请注意的没有的这些解决方案将扩展像S3一样。每个解决方案有任何限制多少文件,它可以支持的文件,如何大就可以了,如果一个文件被频繁更新(例如,它可能保存了错误的版本)会发生什么情况。 S3文件系统看起来整洁在第一,但是当他们有问题,他们很难解决(他们只能返回通用文件系统错误消息)和一个难以解决。

Second, please note that none of these solutions will scale like S3 does. Each solution has arbitrary limits on how many files it can support, how large the files can be, and what happens if a file is updated frequently (i.e. it may save the wrong version). S3 Filesystems look neat at first, but when they have problems, they are hard to troubleshoot (They can only return generic filesystem error messages) and a harder to fix.

一些想法:

  • 如果你真的只是想云备份,可以考虑使用,而不是S3 EBS。无论是附加一个EBS驱动器连接到EC2中,或运行存储网关,了解当地的框。

根据不同的读/写模式和延迟,以及文件的大小,等等,你可能会使用类似 s3sync 代替。有它下载所有的文件,然后做一个双向再同步到S3定期皮卡任何新文件或删除已在S3中被删除的文件。

depending on the read/write patterns and the delays, and the size of the files, etc, you might use something like s3sync instead. Have it download all your files, then do a bi-directional re-sync to S3 periodically to pickup any new files or delete any files that have been deleted in S3.

如果你只需要支持上传,只需定期上传新文件到S3 cron作业,然后删除它们。

If you only need to support uploads, just have a cron job that uploads new files to S3 periodically, then deletes them.

这篇关于使用S3作为存储FTP服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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