Is there a .NET library that I can use to sync a folder to S3? I am not interested in full apps or command line tools, just the API. I need to use it from my own app directly.
If there isn't, has anyone written their own, and if so, can you share some of the key considerations when writing one? Anything specific I need to watch out for?
顺便说一下,我将使用它进行备份,这样我就不必每次都压缩整个文件夹并将 zip 文件上传到 S3。我希望以这种方式对非常大的文件夹(例如 SyncBack)执行此操作将花费更短的时间。
您可以定期简单地循环浏览文件列表并使用这些库来调用 API http://weblogs.asp.net/israelio/archive/2004/06/23/162913.aspx 或 尝试http://msdn.microsoft.com/ en-us/library/system.io.filesystemwatcher.aspx?您可以简单地观看 OnDeleted、OnCreated 和 OnChanged 事件。并相应地调用S3 API。
您甚至可以临时压缩它,然后按照此处的建议将其放在 S3 上。如何使用 .NET 创建 7-Zip 档案?。上传到 S3 后立即删除。