On Wed, December 6, 2006 10:00 pm, Ben Buxton wrote:
> Voytek Eymont wrote:

>> can I clone a running system ?
>
> Yes, you can.

Ben, thanks for detailed info

what I really meant to ask, was 'can I copy/clone a running systems whilst
it's in normal operation'; I gather the answer is 'no'


> Boot the system to a bare shell, by giving grub/lilo the "init=/bin/sh"
> kernel option.
>
> Then mount all disks (look at /etc/fstab to see which ones are there)
> read-only (give the "-r" option to mount).
>
> Then partition your new disk. Format the partitions as you see fit.
> Mount them all somewhere, such as under /mnt/newdisk, and using the
> final hierarchy (so /mnt/newdisk as root, /mnt/newdisk/home, etc).
>
> Then copy all old partitions over, using the "-ax" option to do
> individual filesystems. Eg:
>
> cp -avx / /mnt/newdisk cp -avx /home/ /mnt/newdisk/home [etc]
>
>
> The "-a" flags copies all attributes and ownership, and "-x" keeps each
> operation to one filesystem. "-v" turns on verbose (ie prints each file as
> its copied).
>
> Once it's all copied, install the bootloader to the new disk, and you're
> done. You might need to change the fstab if you've changed partitions.
>
> BB

-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to