[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cloning Debian?



[20030818] Gregory Guthrie <guthrie@mum.edu> wrote:

[snip]
> I have a working system, and want to clone it to a bigger, newer, faster 
> one, keeping the old one as a backup...
[/snip]

[snip]
> Any ideas on remedies, or other /better ways to do a remote clone?
> I've spent way.... too much time trying things that should work in a simple 
> manner!
[/snip]

My way for cloning debian installations remotely via ssh, aka
getting our hands dirty.
First grab an iso of lnx-bbx (from lnx-bbx.org), burn it, boot
it on the "target" box, set up network & make sure the "source"
box has sshd running.

On the "target" :
1. cfdisk your disk
2. mkfs your destination partitions 
3. $ mkdir /mnt/rw/target
4. mount destination partitions on /mnt/rw/target
5. $ cd /mnt/rw/target
6. $ ssh SOURCE_IP 'cd /; tar -cplf - C / .' | tar xpvf - -C .
(repeat 6 for all separate mounted partitions, like /boot, /usr
etc. by replacing 'cd /' with ie 'cd /boot')

Take a nice nap :)

7. edit /mnt/rw/target/etc/{lilo.conf,fstab} to match the "target"
system.
8. $ lilo -v -C /mnt/rw/target/etc/lilo.conf 
9. reboot & re-run lilo on the target box.

-- 
Manolis Tzanidakis
(mtzanidakis-at-freemail-dot-gr)
Jabber: mtzanidakis@jabber.org
ICQ: 102798230
GnuPG Key Fingerprint: 
5CA5 41D6 09F1 C4B9 C331
65EF 4B3F 6979 EB8C 88F3
Get my public key at: pgp.mit.edu

Attachment: pgpaDleiC9nBC.pgp
Description: PGP signature


Reply to: