且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用C#中的增量编码进行增量备份

更新时间:2023-01-09 13:08:46

嗯。

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.