[wplug] Cloning a machine
Michael Skowvron
michaels at penguincentral.org
Thu Sep 1 11:03:40 EDT 2005
Chris Romano wrote:
> Say that I want to use Knoppix and use the network, what is the best way
> to copy the data over? I have never did anything like this before.
> Would I have to partition the disk and format it first with Knoppix?
Correct.
1. Bring the system up on Knoppix and partition the system disk to
match the source system.
2. Make filesystems and mount the partitions. I usually use something
like /d2, so I end up with:
/ is /d2
/var is /d2/var
/home is /d2/home
etc...
3. Ensure that networking is up. If I recall, you'll configure this
during the Knoppix boot.
4. Move your data across using ssh
target # cd /d2
target # ssh root at source "cd / ; tar cBlf - ." | tar xBf -
target # cd /d2/var
target # ssh root at source "cd /var ; tar cBlf - ." | tar xBf -
-B is required to block the data correctly across the net
-l prevents tar from crossing into another mount point
5. After populating the system drive, configure the boot loader, by
chroot-ing into the root filesystem and running the appropriate
command
target # chroot /d2
target # lilo
tarxet # exit
6. Reboot!
Some folks might be concerned about copying a live filesystem and it's
true that there is a small chance for a file to change during the
copy. Most likely, it's just going to be a log file and will not be an
issue.
I always use xfsdump to move my data because, by design, it is safe
for dumping live filesystems. If you're using xfs filesystems, I
highly recommend xfsdump/xfsrestore over tar.
Michael
More information about the wplug
mailing list