`dd_backup` is a Linux command-line tool that performs block device backups using the `dd` command with a json config file - GitHub - arminfro/dd_backup: `dd_backup` is a Linux command-line tool th...
I've developed my first Rust program with some help of ChatGPT. The result just got its first release.
You can configure filesystems to host backup image files of devices in a json config file.
You can specify the amount of backups for each device, preserving a static size and count.
Running dd_backup run will initiate the backup process, creating backups for all connected filesystems and devices which are configured.
Has some safety features, like checking fsck -n before writing or calls sync before unmount. Never be afraid of confusing if= and of= anymore when running dd 🙈.
dd_backup is designed to run on Linux systems, and you can also utilize it on a booted Linux live system to back up your Windows devices or others.
I've added some text to the readme to clarify the distinction to other backup tools and also to express my personal use case:
Why block device backups?
dd_backup operates at the block device level, offering a distinct approach to backups compared to many other backup tools that work at the file-system level.
When performing backups at the block device level, you will get a complete backup of the device, capturing all data, configurations, and file systems as they are, without any abstraction or modification.
This comes at the cost of more time and more storage space on creating, since all sectors are captured including empty ones.
The main reason why you may like to have a block device backup is backing up the operating system with all partition and storage configurations in the same way as your other data.
In the event of a sudden hard drive failure, you can quickly restore the entire block device, enabling a faster recovery process of your OS device.
It's even possible to combine this approach with backup tools operating on the file system layer, since you can use a loopback device to read and write the image file, created by dd.
You can run dd_backup once to create the initial block device backup and then use the resulting image file for restoration or for subsequent file-system level backups, capturing specific changes and modifications.
In my personal use case, I run dd_backup before going to sleep, as the creation time is not a concern for me.
I employ it on a bootable live Linux system that is configured to automatically run dd_backup upon boot.
This setup enables me to back up my home server, which lacks a display or keyboard, without the need to physically move the server and its external storage devices to my desk.
Additionally, I have two physical hard drives in my main computer, one for my Linux system and the other for my Windows system, both sharing a boot partition.
In the worst-case scenario of one hard drive failure two operating systems are not bootable.
Yes, it's essentially just this command. But if you do it many times or for different harddrives, then it's useful to have a configured tool which you just ran and may do several dd's at once. Also it does delete oldest backup (if you wish so). And calls sync and fsck for you