[CentOS] Transferring system to new drive

Les Mikesell lesmikesell at gmail.com
Fri Sep 17 18:09:40 EDT 2010

On 9/17/2010 4:52 PM, Timothy Murphy wrote:

>>>> I was thinking of copying the old root partition with
>>>> sudo cp -a -P /* /mnt/hd
>>> I think the command rsync is a better approach for this task. It has
>>> much more features, for example, you can exclude certain files.
>> Thanks for the suggestion.
> Thanks for all the responses.
> Further to my query,
> I'm wondering if one can safely copy partitions
> (in particular the root partition / )
> while the system is running.
> The reason that I ask is that I'm slightly afraid
> the machine will not re-boot into single-user mode
> with the present OS on the sick disk.

Theoretically you shouldn't, but I've never had a problem using rsync to 
copy running machines - the same should apply to tar/cp/cpio, etc.   A 
dd-style image copy would not be safe with the disk changing, though.

Be sure you exclude /proc, /sys, /dev.  And if you have trouble, you can 
boot the system install disk in rescue mode to recover.

   Les Mikesell
    lesmikesell at gmail.com

More information about the CentOS mailing list