clone hard disk with: cat /dev/sda >/media/disk/backup
Can this be done and to restore the disk with a similar cat command.
|
Quote:
backup: Code:
dd if=/dev/sdx of=/drive/backup.img |
Yes, it is possible thanks to the everything is a file philosophy of Unix. Dd has some options that might make using it preferable.
One thing you can do is use "df" to determine how much free space is left on the filesystem, and then create a file of zeroes using dd of that size. Then delete that file. This will zero out the free space which may make the partition more compressible by piping the output of dd through gzip. To restore you can use zcat and pipe the output to dd. |
This may go without saying, but I strongly recommend un-mounting /dev/sda or its partitions before performing any direct device reads.
also look into 'dd_rescue' -- basically the same idea as 'dd' but has some nice error handling capabilities. |
All times are GMT -5. The time now is 09:54 AM. |