I have a failing HDD that I want to fully backup and replace withing the next few days. I am running OMV6 with my Plex Server attached to it. I watched a video on YouTube how to copy the content of mt HDD. I also was reading on how to compress the content of my drive and save it as an image, and then decompress it again when I am ready to restore it.
I did modify this to represent my current drives, The command I saw to use on YouTube is as follows:
sudo dd if=/dev/sdk of=/dev/sdf1 bs=1M status=progress.
My question is when reading if I'm to understand this correctly, to compress and make an image the command would be, take note I'm not writing to a SD card but rather an HDD:
sudo dd bs=1M if=/dev/sdk | gzip -c > /dev/sdn-copy.img.gz
And to decompress it:
gunzip -c dev/sdn-copy.img.gz | dd of=/dev/sdk bs=1M