I'd like to have a strategy to be able to make backup images of a Pi while it is running, but then have the option to restore that image to the SD Card in the case the system becomes unbootable or needs to be fully restored.
I found this article that shows how to use dd to create an image (to a NAS share over the network for example).
sudo dd if=/dev/mmcblk0p2 of=/home/pi/networkdrive/my.img bs=1M
However there is no guidance on how to restore, especially if the Pi is unbootable.
I'd like to be able to restore the .img file using a tool like Win32DiskImager. It defaults to .img files, but how can I determine if the .img file created by dd is the same as the .img file used by Win32DiskImager?
I've reviewed the Win32diskimager site, and it is not clear if the .img files are the same. Is restoring a dd img file to an SD card with Win32disk imager going to be successful?