
Each of us sometimes loses information. By his mistake (trembling hand, CTRL + S keys not pressed in time), or due to an unfortunate coincidence of circumstances (traffic jams were knocked out, the computer was frozen). Sometimes it's about trivia. It happens that you have to re-do the work. In the worst case, valuable information is irretrievably lost.
We all know that it is necessary to periodically make backups. We know, but we do not. And if we do, then, according to the law of meanness, when necessary, a copy of a month ago is the best that can be found. But it also happens that the lost file was created just a couple of hours ago.
When I could not decide on the theme of the diploma, an acquaintance told me about Apple's TimeMachine and suggested making an analogue for Windows. Continuous data protection is something that I have always subconsciously dreamed of.
Basic requirements for the program:
- The ability to restore the state of the file at any time.
- No noticeable additional load on the system.
The program should work seamlessly for the user, as if it does not exist at all. At the same time, it is possible to easily restore the version of the file to a user-specified point in time (whether it is a minute ago, an hour or a week).
Also, the program should monitor the state of the repository, prevent its endless swelling. It is required to remove the least significant states in a timely manner in order to keep the size of the storage within the specified limits.
')
What happened
I will write in brief. The developed system consists of two parts. The first is a system service running in the background and performing the main work. The second is an application that provides an interface to the user.
The service keeps track of all file operations (create, delete, modify, rename) and, depending on the settings, creates recovery points for the necessary files. Upon request, the client application provides a history of changes and restores the state of the file to a specified point in time.
screenshots are clickableThe client part provides the interface to the user and sends requests to the service via TCP / IP protocol (the service executes these requests and reports the result). In fact, the client application can be any and all that is required from the developer is to save the interaction protocol. For example, you can implement control through the context menu (the one that appears when you right-click on a file or folder).

As you can see from the screenshot, the program does not copy each version of the file to the storage. Instead, when adding a regular version, it searches for the one closest to it (from those already saved). If possible, only a list of changes is entered into the repository (in this case, the same partially saved version can be taken as a basis). As a result, the “objects” in the repository are divided into 3 types: the full version (the entire file), a list of changes, a link (in case the version is a full copy of another).

Only key settings:
- Masks of ignored files (will not be processed anyway)
- File masks for backup (specific folders can be specified)
- Path to the repository
- Maximum storage size
- Maximum file size
The client application was developed literally in a day, because the deadlines were pressed (such important functions as the complete removal of the file from the repository, the removal of certain versions of a specific file, etc.) are missing.
The program was written more than two years ago, and since then the service has been constantly running on my laptop. Performs its functions by 100%, there are no problems with speed (no additional load on the system is felt).
What's next?
I want to ask this question to the community. Is there real demand for such backup systems? Is it interesting to anyone? Does it make sense to continue developing?
And the work is, in fact, a lot. Storage at a remote resource, data encryption, integration with the OS, convenient user interface. You can start with the fact that the current version of the service does not work on Windows Vista (it does not register and does not start).
narod.ru/disk/15172062000/TimeMachine.zip.html