This is a bit of a follow on from another users question found here: SD card cloning using the dd command
I have used the dd command to clone or make backup copies of SD cards with limited success. These are for single board computer projects of mine, where it is prudent to fully backup the SD card now and then. I say limited success because at times, I have been able to do a full restore of a system (card) using the advice found online.
Note however that at other times this has not been the case, and I am wondering whether it has something to do with the mounting (or ideally unmounting of the card as there is some confusion here (for me anyway).
Question 1: When I run umount (as suggested in the above mentioned forum page) it reports that the device is not mounted. Is that because it just unmounted the device, or because the device I have specified to unmount doesn't exist to be unmounted in the first place?
To unmount, I use the following command:
sudo umount /dev/sdc
Question 2: In the Ubuntu 16.04 (Files) GUI utility, the USB memory stick or SD card inserted in USB has a little upwards facing arrow to the right of it. If you click on this, it effectively disconnects the device and makes it safe to remove. Is this the same as unmounting in the CLI? It does not appear to be the case, as when I have done so, the dd command kicks up an error that it can't find my device to create an image of. If I unplug the SD card (USB) and then plug it back in, The SD card is shown once again with the little arrow, and I can use DD without issue to create the image (though whether the image is any good is another question, as I still don't know whether or not it was actually unmounted prior to image generation!)
Question 3: When I run
sudo fdisk -l, I see my card listed as
sdb, however if I use the disks utility, I see the SD card actually consists of at least 3 partitions (SDB repeated for 2 of the partitions, and SDB1 for the bulk or main partition). Which partition am I to select as part of the dd operation? Won't dd limit itself to only making an image of that partition, ignoring the rest of the SD card? If so it's not really relevant to call it a disk imaging tool as such...
Finally, this is the dd command that I run to create a compressed image of the SD card (When I get this right, it works perfectly, and Etcher has no issues reading the zipped image too)
sudo dd if=/dev/sdc | pv | gzip > FileNameHere.img.gz
Your assistance is appreciated for somebody who is still learning the ropes with Linux, even after several years of use and experience so far.