I have worked out the dd command to copy my work in progress 4Gb image:
dd if=/dev/sdb of=cubietruck.img bs=512 count=6268927
and restore it with:
dd if=/home/rgm/arm/Centos/cubietruck.img of=/dev/sdb bs=4M; sync
But I would like to compress this, making a .xz file that is expanded with xzcat.
I have not figured this out, so am asking for a bit of help (I have had to increase the root partition so backing up is a larger file now).
thanks
On 05/05/17 17:33, Robert Moskowitz wrote:
I have worked out the dd command to copy my work in progress 4Gb image:
dd if=/dev/sdb of=cubietruck.img bs=512 count=6268927
and restore it with:
dd if=/home/rgm/arm/Centos/cubietruck.img of=/dev/sdb bs=4M; sync
But I would like to compress this, making a .xz file that is expanded with xzcat.
I have not figured this out, so am asking for a bit of help (I have had to increase the root partition so backing up is a larger file now).
thanks
well, "dd if=/dev/sdb| xz > file.xz " ?
I prefer using myself pxz for parallel compression. As the tool we use to create the images just output raw .img file, we compress those like this : for file in *.img ; do echo "==== Compressing ${file} ======" ; time pv ${file} |pxz -T 16 > ${file}.xz ; done
Apply some salt/pepper to your needs and enjoy :-)
On 06/05/17 14:15, Marcin Juszkiewicz wrote:
W dniu 05.05.2017 o 21:53, Fabian Arrotin pisze:
I prefer using myself pxz for parallel compression.
"xz -T0" ;D
Yes, off-topic now, but as those images are still compressed (at the CentOS side) on a CentOS 6 node, pxz is still used. "man xz" on a el6 shows that "-T" exists, but :
" Multithreaded compression and decompression are not implemented yet, so this option has no effect for now." ;-)
</offtopic>