I’m developing an application that I want to put on a bootable CD. Sort of my free version of a Paragon’s Software for backing up partitions and/or whole drives, and restoring them. But I’ve got a lot to learn yet.
OK I want a command line command ATM to make an image of an unmounted partition sda5, zip it up and put it on a mounted partition sdb1 mounted at /sdb2. I think this will do that:
dd if=/dev/sda5 | gzip -c > /sdb1/sda5.img.gz
I think this will read the partition sda5 with “dd sda5”, zip it to standard output with “gzip -c”, and pipe that standard output to a storage file sda5.img.gz which will be located on the mount (sdb1) at /sdb1/sda5.img.gz by the pipe (?) thingy doing “> /sdb1/sda5.img.gz”.
OK I tried these commands:
-
I do it unzipped with this:
dd if=/dev/sda5 of=/sdb1/sda5.raw.img
and get a file sized 6Gb for a windows ntfs partition -
I do it zipped with this:
dd if=/dev/sda5 | gzip -c > /sdb1/sda5.img.gz
and get a file sized 3.4Gb which is good reduction (if it’s a valid method) -
I do it zipped with this:
dd if=/dev/sda5 | gzip > /sdb1/sda5.img.ver2.gz
and get a file sized 3.4Gb (actually its exactly the same number of bytes) which is good reduction too (also if it’s a valid method)
You can see how I’m struggling here.
All well and good, but are the algorithms/commands even valid? And which is correct, the gzip version 2 using “-c” or the version 3 without “-c” ,or both (sheesh)?