[H-GEN] Cloning Linux System

Kelvin Heng kelvinheng at hotmail.com
Sat Jun 4 03:55:14 EDT 2005


Hi James,
Thanks for your advise.

What will happen if I have a few mount points in that server (to be clone)
Example:
/
/usr
/var
/usr/local

Do I use the same command "cp -r -a -p / <target>" as you have mentioned?

At first, I was thinking of doing this command "dd if=/dev/sda of=/dev/sdb" 
as I thought I can shutdown the server and insert a new HDD but later found 
out that I can't shut it down due to operational requirement.

So If I use your method, that is to setup a second server and have a spare 
HDD ready for cloning installed on the second server then follow by setting 
up a NFS share on the server (to be clone). And I issue that command "dd 
if=<NFS mount> of=/dev/sdb" on my second server.

Will this work?

Regards,
Kelvin Heng

>From: James Mills <prologic at shortcircuit.net.au>
>To: HumBug Mailing List <general at lists.humbug.org.au>
>Subject: Re: [H-GEN] Cloning Linux System
>Date: Sat, 4 Jun 2005 17:45:03 +1000
>
>[ Humbug *General* list - semi-serious discussions about Humbug and     ]
>[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
>
>On Sat, Jun 04, 2005 at 06:56:40AM +0000, Kelvin Heng wrote:
> > [ Humbug *General* list - semi-serious discussions about Humbug and     
>]
> > [ Unix-related topics. Posts from non-subscribed addresses will vanish. 
>]
> >
> > Hi guys,
> > I have a question, hopefully there is a solution for it.
> >
> > I need to clone a Redhat Linux (7.2) server to a secondary location 
>(e.g.
> > Another Server or USB HDD). But I have some restriction, I am not able 
>to
> > have any downtime for the server and will be required to carry out this
> > task while the system is operational.
> >
> > Please advise if you know of any method. Thanks in advance.
>
>In the pst I have cloned Debian systems with the following method:
>
>cp -r -a -p / <target>
>
>Where <target> is some mount-point of the newly clonded hard disk.
>You would have to skip /dev and /proc though :)
>And if you have multiple partitions, you'll have to setup the
>partitions on the new hard disk first and change the method
>to copy the parittions individually.
>
>Now, since you don't want to take the server down, you may have
>to try the following:
>
>1. setup sshfs on the server
>2. from another machine, mount the file system of the box
>    to be cloned (with root priveleges)
>3. then clone
>
>cheers
>James
>
>--
>--
>-"Problems are Solved by Method"
>-
>
>_______________________________________________
>General mailing list
>General at lists.humbug.org.au
>http://lists.humbug.org.au/cgi-bin/mailman/listinfo/general






More information about the General mailing list