使用C#中的增量编码进行增量备份 [英] Incremental Backup using Delta Encoding in C#

查看:110
本文介绍了使用C#中的增量编码进行增量备份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个小型备份工具。这个备份应该是增量的。假设我有2个文件,那么我的备份目标必须只包含这两个文件的差异(补丁文件生成)。我用Google搜索了搜索方法!我找到了Delta编码。但我不知道如何实现它。?



请有人建议任何想法来实现这一点..并建议任何样本C#代码!



谢谢!

I'm doing a small backup utility.This backup should be incremental. Suppose I have 2 files, then my backup destination must contain differences of those two files only (Patch file generation). I googled it to search the ways to do this! I found "Delta encoding". But I don't have idea about how to implement that.?

Please anyone suggest any ideas to accomplish this.. And suggest any sample C# code also!

Thank you!

推荐答案

嗯。

google的第一页Delta编码是Wiki: Delta编码 - 维基百科,免费的百科全书 [ ^ ]其中包含C语言中的示例代码。

如果您无法应对实施像这样的一小段代码 - 即使你没有特别知道C#之外的任何东西也应该很明显 - 那么说实话我建议你在你走路之前试图跑。备份是严肃的事情:你不应该尝试编写自己的备份系统,除非你非常非常确定你知道自己在做什么。请记住,您将使用此功能(并且您可能是 使用它的人)在发生重大故障(甚至意外删除)时保存您的工作) - 此时您需要的最后一件事是在代码中发现一个错误,意味着您没有正确备份,或者您需要从备份中恢复的exe只在备份文件中。 ..



我知道我在做什么 - 或者我喜欢这么认为 - 我使用的是商业备份包(AOMEI Backupper)而不是写我自己的就是这个原因! :笑:

严肃地说,我强烈建议你找到一个不那么关键的项目,直到你有足够的经验 - 备份是一项严肃的事业,应该被视为这样。
Um.
The first page when you google "Delta encoding" is Wiki: Delta encoding - Wikipedia, the free encyclopedia[^] which includes sample code in C.
If you can't cope with implementing a trivial piece of code like that - which should be pretty obvious even if you don't specifically know anything but C# - then to be honest I'd suggest that you are trying to run before you can walk. Backups are serious business: and you shouldn't attempt to write a backup system of your own unless you are very, very sure that you know what you are doing. Remember, you will be using this (and you'll probably be the only person using it) to save your work in the event of a major failure (or even accidental deletion) - and the last thing you need at that point is to find a bug in your code that means you didn't back up properly, or that the exe you need to restore from the backup is ... only in the backup file ...

I know what I'm doing - or I like to think so - and I use a commercial backup package (AOMEI Backupper) rather than write my own for just that reason! :laugh:
In all seriousness, I'd strongly recommend you find a project that is a lot less mission critical until you have a good deal of experience under your belt - backups are a serious business and should be treated as such.


这篇关于使用C#中的增量编码进行增量备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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