Analogue Time Machine for Windows

    Time machineEach of us sometimes loses information. By his mistake (a quivering hand, CTRL + S keys not pressed at the right time), or by an unfortunate combination of circumstances (knocked out traffic jams, the computer crashed). Sometimes we are talking about trifles. 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 don’t. 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 a lost file was created only a couple of hours ago.
    When I could not decide on the topic of the diploma, one friend told me about Apple's TimeMachine and suggested making an analogue for Windows. Continuous data protection is what 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, provide the ability to easily restore the file version to a user-specified point in time (be it a minute ago, an hour or a week).
    Also, the program must monitor the state of the repository and prevent its infinite swelling. It is required to remove the least significant states in a timely manner in order to keep the size of the storage in a given framework.

    What happened


    I will write in brief. The developed system consists of two parts. The first is a system service that runs in the background and does the bulk of the work. The second is an application that provides an interface to the user.

    The service monitors all file operations (create, delete, modify, rename) and, depending on the settings, creates recovery points for the necessary files. At the request of the client application provides a history of changes and restores the state of the file at a specified point in time. clickable screenshots

    tm_service.png - upload images with Picamatic


    The client part provides an interface to the user and sends requests to the service via TCP / IP (the service performs these requests and reports the result). In fact, the client application can be anything 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).

    tm_main.png - Picamatic - upload your images

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

    tm_options.png - Picamatic - upload your images


    • Masks of ignored files (will not be processed in any case)
    • File masks for backup (specific folders may be specified)
    • Vault path
    • Maximum storage size
    • Max file size

    The client application was developed literally in a day, because it was running out of time (there are no such important functions as the complete removal of a file from the repository, the deletion of certain versions of a specific file, etc.).
    The program was written more than two years ago, and since then the service has been constantly running on my laptop. It performs its functions 100%, there are no problems with speed (there is no additional load on the system).

    What's next?


    I want to ask this question to the habrasociety. Is there real demand for such backup systems? Is this interesting to anyone? Does it make sense to continue development?
    But there’s actually a lot of work. Storage on 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

    Also popular now: