Hardlink backup for Windows

    The idea of ​​writing this article and creating a program in particular was Oleg_Sh 's story about how he created a backup tool from his tools that uses hardlinks to replace duplicate files. This idea turned out to be so simple and ingenious, and always lay on the surface that it was decided - you need to screw such a thing on yourself. Moreover, I needed very similar functionality and from time to time I looked for something very simple to replace with paid or bulky harvesters, which also did not do exactly what was required for my tasks.

    And not so much was required - firstly, at any moment in time, copy any files, including working databases, so as not to force people to exit programs even at night, and copy quickly; secondly, to be able to quickly restore data from a backup (storing data “as is” is ideal), thirdly, to store as many backups as possible, and not only how, but with a complete data structure. All these tasks can be perfectly realized with the help of shadow copying and the use of hardlinks. But here is that implementation - on a heap of batch files and using a ported version of rsync (which also required a bunch of cygwin libraries and had problemswith non-standard characters), I did not like it at all. I began to look for alternatives, but I could not find exactly what would suit me perfectly. Therefore, it was decided - it is necessary to make it easier and better, and not only for ourselves, but also for our colleagues.


    Features and recommendations


    So the first version of LightBackup appeared, which already performs the tasks assigned to it. The possibilities are as follows:

    • The program works with any Windows OS from WinXP and higher, all bit sizes.
    • Shadow copying of volumes to read locked files is supported.
    • Hard links are created for files that have not changed since the last copy.
    • File system paths of any length and any encoding are supported.
    • Full Unicode support, two interface languages ​​(Russian and English).
    • Creating a common log of the program and logs for each copy.
    • Support for silent mode and automatic deletion of old copies.
    • It does not require any third-party libraries for its work.

    A shadow copy is always created before copying, this allows you to save any data, even open for exclusive access, for example, a database or the entire partition with the operating system. At the first start, the data is copied as it is, at the next - the file dates in the source and the last backup are compared, and instead of copying unchanged files hard links will be created on them - this will greatly speed up the backup and save a lot of space. You can set the number of stored copies, old ones will be automatically deleted. The number of copies must be at least 2 and not more than 1024, and the partition for storing data must have the NTFS file system. Copying is preferably done on a physically different medium, otherwise backup will not make sense if the source breaks. Thus, despite incremental data copying, thanks to hard links, the complete data structure in any backup will be visible. At the same time, it is not advisable to change the data in the backup, otherwise the changes will be transferred by hard links to other copies. Archiving is not performed intentionally, it allows you to access the data in the backup instantly and from any system. Shadow copying does not cancel access rights, therefore, the user under whom the program is running must have the right to read the information being copied. this allows you to access data in the backup instantly and from any system. Shadow copying does not cancel access rights, therefore, the user under whom the program is running must have the right to read the information being copied. this allows you to access data in the backup instantly and from any system. Shadow copying does not cancel access rights, therefore, the user under whom the program is running must have the right to read the information being copied.


    configuration file


    [Main]
    Silent = 0 # Показать сообщение после завершения копирования
    [Config1] # Имя секции в формате ConfigX, где X - номер профиля
    Snapshots = 3 # Какое количество резервных копий хранить
    Source = C:\Windows\System32\Config # Что нужно копировать
    Backup = D:\Backup\Config # В этой папке будут храниться резервные копии

    The following sections are written in the same format, only the profile number increases in ascending order, for example Config2, Config3, etc. The Backup parameter must point to different directories everywhere, folders are created by date and time. An example configuration is created the first time the program starts. So in the first example, a registry backup is created, and the second example copies the database from C: \ Bases to D: \ Backup \ Bases and stores all copies for six months if the scheduler starts once a day:

    [Config2]
    Snapshots = 180
    Source = C:\Bases
    Backup = D:\Backup\Bases

    If you want to temporarily disable a profile without deleting it, simply rename the section so that it does not match the ConfigX pattern. But the naming order of the sections should remain, since if the program does not see, for example, the second profile, the program will not execute the third.


    Licensing


    The program is completely free for personal use on non-server operating systems. For commercial use on server operating systems, a small cost may be introduced, but before the new year, keys will be handed out free to everyone (send the HWID from the configuration to support@lightbackup.com). However, the difference between the registered version and the usual one is only one message at the end of the copy. In other words, there are no functional limitations even without registration, and a purchase decision can be made after any period of use of the program or when the reservation needs to be configured for silent automatic execution in the scheduler.Here I ask you to understand me correctly, because who knows how much I try to do for all for years completely free, when donations do not even pay for the Internet, he will understand me.

    Note for organizations - my root certificate is included in the certificate chain by which the executable file is signed. If necessary, you can add it to your certification authority for a trusted launch of the program.

    Download LightBackup 1.0 here . I hope she will be useful to you.

    UPD: If you want to support the development, you can use the details for the donation from another project whose website is listed in my profile.

    Also popular now: