Any software that will do a boot disk image backup without stopping the computer that can be used for bare metal recovery of a Linux system?
The software needs to produce a crash consistent disk image, which is usually done usinga snapshot of the source data. All the software mentioned in this post don’t seem to be able to do it: My personal Linux backup strategy .
You can create a snapshot and copy it with dd but I think that is only a copy of the snapshot and not a full disk image backup that can be used for bare metal recovery.
What filesystem and partition layout are you working with? That’ll narrow down which approach makes the most sense for your setup.
So what you’re looking for is definitely doable. Clonezilla can do a live image if the filesystem supports it, but honestly the more common approach for what you’re describing is to use something like Rescuezilla.
Or just lean on LVM snapshots if your setup uses LVM. You take an LVM snapshot of the volume while the system is running, then image that snapshot with dd or Clonezilla, and you’ve got yourself a crash-consistent bare metal image without any downtime.
If you’re not on LVM, another solid option is Veeam Agent for Linux. [YouTube] The free version supports bare-metal recovery and can do hot backups of a running system. It handles the snapshot part internally so you don’t have to think about it too much.
There’s also btrbk if you’re on btrfs, since btrfs snapshots are atomic and you can send those off to another drive, though restoring bare metal from that takes a bit more manual work compared to a straight disk image.
@Rob you are correct, the dd command can currently create a single partition image such as the EFI partition, but restoring it it’s a bit tricky because it does not store the information about the original volume: I come on this issue as well.
I’m familiar with Clonezilla used it many times. From everything I’ve researched Clonezilla requires you to stop the computer and boot from external media. You cannot backup/clone a running Linux computer.
The question here is generic and not directed towards any flavour or filesystem type of Linux. I’ve worked on Solaris, HP-UX and AIX where they come with bultin native bare metal recovery apps, I thought it strange that after 30+years Linux still does not have a native utility for this.
Some of the comments are really useful, thanks. Found a script snippet (not tested) that answers one of my questions - what do you input into dd? dd if=/dev/${VG}/snap-${LV} | pv -s ${LV_SIZE}G | pigz | test.img.gz
pv and pigz being optional