[H-GEN] Cloning Linux System
Sun Jun 5 01:23:10 EDT 2005
On Sat, Jun 04, 2005 at 06:56:40AM +0000, Kelvin Heng wrote:
> 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.
In general, you're screwed. In practice, you'll probably get away with
using the tools others have suggested here sufficiently often that you
can consider them workable solutions.
> Please advise if you know of any method. Thanks in advance.
You need to plan this properly. There are a number of subtleties which
need to be considered. First, answer "why am I doing this?", even if
just to yourself: are you making a one-off copy of the working system
"just in case"? are you trying to bootstrap a system so you can boot it
and shut down the original? are you trying to gather information for
forensic purposes?
After you know why you're making a copy of the original system you can
start to make some design choices. Basically it comes down to just how
good a copy you want. I've listed two options and the means to decide
between them below.
bit-for-bit: dd if=/dev/hda1 of=/mnt/hda1.img
pro: gives a perfect copy of hda1 in a file you can stash for archival
purposes or use as input to later dd invocations to write to another
disk.
con: you're not guaranteed to get a valid filesystem if anything
changes as you're copying it. On an active system it will almost
certainly not work.
dump/restore: /sbin/dump -0af /mnt/hda1.dump /dev/hda1
pro: gives a copy of the filesystem in a fairly convenient format for
many purposes; handles incremental updates if that's something you
want.
con: will complain if files change while the dump process is running.
This could be construed as a feature. Files will not receive the
same inode numbers on the target system; this may be an issue if
you're running software that cares about such things.
jason
More information about the General
mailing list