[PLUG] How to make a complete copy of a partition?

David dafr+plug at dafr.us
Sat Aug 30 23:45:52 UTC 2014


On 08/30/2014 03:43 PM, John Jason Jordan wrote:

<snip>

> The destination will be a 3 TB USN 3.0 external drive. It has about 1.5
> TB free space on it.
>
> I have heard of dd, but I know little about it. Before I invest a lot
> of time struggling to understand its man pages, is this the best tool
> for what I want to do? Or are there better choices?

What you want is probably dd in this case. Basically the syntax is 
pretty simple, but you will need to boot off alternate media (e.g.: a 
DVD) to copy the / filesystem.

The dd command offers a lot of flexibility, but the basics as root are:

      boot rescue disc
      mount {$destination} /media/temp
      dd if=/dev/{$source} of=/media/temp/{$source}.img

Where $destination is your separate hard drive, and $source is the 
partition (sda1, sda2, etc.) that you want to archive.

Depending on how much data there is will largely determine how long it 
takes, but it's a block by block copy of the original which you appear 
to want here.

dafr




More information about the PLUG mailing list