Sample Header Ad - 728x90

compressing and decompressing dd image - zstd instead of gzip

18 votes
2 answers
38949 views
Earlier I was using fsarchiver to create compressed partition image. Due to some weird behavior I am choosing to replace it with dd. However, I like how fsarchiver compressed with zstd . So, I studied, - How to make a disk image and restore from it later? - Using DD for disk cloning - Making full disk image with DD - compressing dd backup on the fly - How do you monitor the progress of dd? What these essentially say is, I have to use the following command to backup dd if=/dev/sda2 status=progress | gzip -c > /media/mint/Data/_Fsarchiver/MintV1.img.gz And the following command to restore gunzip -c /media/mint/Data/_Fsarchiver/MintV1.img.gz | dd of=/dev/sda2 status=progress Now I want to replace gzip -c & gunzip -c with zstd & zstd -d The commands I came up with are To compress sudo dd if=/dev/sda2 status=progress | zstd -16vT6 > /media/mint/Data/_Fsarchiver/MintV1.zst To decompress zstd -vdcfT6 /media/mint/Data/_Fsarchiver/MintV1.zst | dd of=/dev/sda2 status=progress Is it safe to try these commands or am I doing something wrong?
Asked by Ahmad Ismail (2998 rep)
Jan 6, 2019, 08:55 AM
Last activity: Sep 10, 2022, 09:28 PM