08-18-2019, 07:05 AM
I have used this : https://serverfault.com/questions/86808/...iple-files
The one that uses split works well.
Requirements:
Some linux distribution live media
Portable HDD that has enough storage to hold the compressed clone image
a lot of time
0. As always make backups if something goes wrong.
1. boot from live media
2. make partitions smaller than the destination disk if you they are bigger
3. run commands but dont use the OS you are cloning!
note that you must have a lot of disk space for that on the portable HDD.
then restore with an example:
Sounds complex? it is.
The one that uses split works well.
Requirements:
Some linux distribution live media
Portable HDD that has enough storage to hold the compressed clone image
a lot of time
0. As always make backups if something goes wrong.
1. boot from live media
2. make partitions smaller than the destination disk if you they are bigger
3. run commands but dont use the OS you are cloning!
Code:
dd if=/dev/zero of=<source OS disk (NOT /dev/...!!!!!) it is /media/linuxlite/...> ; rm <source OS disk /media/...>
dd if=/dev/<input_sdx> bs=4M | gzip -c | split -b <splitted file size in gigabytes>G - <existing output dir for files on portable disk>
Example : dd if=/dev/sdx bs=4M | gzip -c | split -b 8G - /media/linuxlite/portable hdd/clone.img.gz.
then restore with an example:
Code:
cat <img files path>clone.img.gz.* | gzip -dc | dd of=/dev/sdy bs=4M
Sounds complex? it is.