New
#1
Imaging a Linux (or Windows) Disk without Macrium -- Not cloning
Hi folks
Again the wonders of DD -- if you need to image (not clone as that's simple enough) a disk for use as a backup and you don't have an available copy of Macrium to hand it's very easy to use DD to image a disk to a file and restore it. Works on any type of disk.
Preferably from say a VM boot a live distro -- fedora is an easy "Windows like" system or use the WSL in Windows
I prefer storing these images on another external drive but it can be done on local HDD if enough space - but if doing this inside a VM it's better to use an external device for obvious reasons !!
so mount the external drive -- mount /dev<device> -t auto -o rw /mnt (/mnt will exist on your live distro)
and simply do the following dd if=/dev/sda conv=sync,noerror bs=128K | gzip -c > /mnt/image.gz
This might take a little while to run depending on size of HDD being imaged so go for a beer or whatever.
To restore -- again boot live distro and as root :
gunzip -c <your image file.gz> | dd of=<target disk>
You can also do this in the WSL on Windows (both backup and restore)
Don't be afraid whether using Windows or any other OS to use the command line !!
Cheers
jimbo