Create a backup img x86

Dietpi-backup works well, probably well enough for most people.
But I’m wondering if it’s all all possible to create an img file backup, so if the worst happens you can restore to another drive, another PC, or just restore to the working drive, but using rufus or some such software.

I’m not asking for the option to be included in the backup process, just wondering if it’s possible?
BTW my daily driver is Windows 10, also used for SSH (bitvise).

Obviously for an SD card installation on a Pi it’s easy enough to use win32 disk imager and a dongle to create a backup, but PC’s tend to have installed drives, mine is unfortunately is an NVMe installed on the BACK of the motherboard, so a complete removal and an almost total strip-down is required to do it the same way. Plus of course, windows will not see the drive so making a backup this way could be very tricky.

But an img file can be moved around easily.
TIA.
Daz.

you could try to create an image using dd command. Some example of what is possible. Before don’t forget to stop all services :slight_smile:

Target would need to be on a different drive. Similar we do with our dietpi-imager But our tool expect the source file system not being in use. Means, the drive would need to be attached to a different Linux box. Which, as I understood, is not possible.

So stop all services, except SSH. I assume that means things like plex, samba, ftp etc.
I’ll look into dd Joulinar, thank you.

you could try following

dietpi-services stop

This will stop all services except SSH and some other like DNS Server.

At best remount the root filesystem R/O while doing dd:

mount -o remount,rw /
dd ...
mount -o remount,ro /