I would like to create a custom initramfs with cryptsetup and dd for easy backup creation and restore without the need for an usb stick.
I imagine with such an initramfs available through the boot manager, it should be possible to create a full dd clone of the system disk onto a secondary disk. The Backup disk is larger than the system disk and is also encrypted. Hence, I need cryptsetup to open the backup disk.
Also, it should be possible to restore the system disk using dd. Since everything is loaded to memory, it should not interfere with the dd restore process.
But I have no clue where to start.
Any Ideas?