How best to copy the entire contents of one partition to another?

Jared Anderson pluggedIn at thegoldenedge.com
Sat Jan 7 23:21:21 MST 2006


On Saturday 07 January 2006 6:07 pm, Josef Lowder wrote:
> I need to try to resintall Mandriva  2006 because the one I've
> been screwing around with for nearly a month is apparently
> all messed up.   It is on partition hda6.
>
> But in doing this, I want to make sure that my /home directory
> (which is on a separate partition, hda7) is protected.  I do have
> a dvd backup of /home, but as an added precaution, I would like
> to copy the entire contents of /home (on hda7) to another unused
> partition (hda8).  Would the following be the correct command to
> do this.  With both hda7 and hda8 mounted, as root:
>
> 	cp -pr /mnt/hda7 /mnt/hda8
>
> Or is there another or better way to do this?
> I've heard of but never used 'dd' ... is that something that might
> be better to use in some way?
>

Depending on size and if an archive is desire, I personally like:

cd $PLACE_WITH_PLENTY_OF_FREE_SPACE
tar cvjpf homedir.tbz /mnt/hda7
cp homedir.tbz /mnt/hda8 (or wherever) && cd /mnt/hda8 (or wherever)
tar xvjpf homedir.tbz 
( then burn backup file homedir.tbz to CD or whatever back you use  )




More information about the PLUG-discuss mailing list