boot server from cd
--Backup existing boot directory to temp if exist
#mv /boot /boot_tmp
#mkdir /boot
#mount /dev/sda1 /boot
--Install the boot loader to /dev/sda1 mounted as /boot
--Umount /dev/sda1 and format sda1 if grup exist before doing grup-install
#grub-install --root-directory=/ /dev/sda
--Change device map during boot from "/dev/sda" to "/dev/hda"
#vim /boot/grub/device.map
--Check the grup exist
#ls /boot
grub lost+found
--Set new server as rsync server
--Edit rsync new server configuration file
#vim /etc/defaul/rsync
ubah ke RSYNC_ENABLE=true
# vim /etc/rsyncd.conf
edit :
[boot]
path= /mnt/sda1
uid=root
read only= no
--restart rsync new server
# /etc/init.d/rsync restart
# ssh [remote ubuntu machine -master]
# sudo -s
# rsync -avr /boot/ rsync://192.168.20.211/boot
sda2
#mkdir /mnt/sda2
#mount /dev/sda2 /mnt/sda2
//server secondary [copy]
#vim /etc/defaul/rsync
ubah ke RSYNC_ENABLE=true
# vim /etc/rsyncd.conf
edit :
[sda2]
path= /mnt/sda2
uid=root
read only= no
--connect to old server using ssh
# /etc/init.d/rsync restart
# ssh [remote ubuntu old server]--Issue command to rsync from old server
# rsync -avr / rsync://192.168.20.211/sda2
--At new server
--To list eth HWAddr to be replace in iftab
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:10:18:27:BC:52
inet6 addr: fe80::210:18ff:fe27:bc52/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4175 errors:0 dropped:0 overruns:0 frame:0
TX packets:508 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:610013 (595.7 KiB) TX bytes:174184 (170.1 KiB)
Interrupt:169
eth1 Link encap:Ethernet HWaddr 00:18:8B:7A:5F:2C
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:177
eth2 Link encap:Ethernet HWaddr 00:13:46:3C:08:64
inet addr:192.168.20.213 Bcast:192.168.20.255 Mask:255.255.255.0
inet6 addr: fe80::213:46ff:fe3c:864/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1460604 errors:0 dropped:0 overruns:0 frame:0
TX packets:696129 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1989609400 (1.8 GiB) TX bytes:50333834 (48.0 MiB)
Interrupt:58 Base address:0x2f00
lo Link encap:Local Loopback
inet addr: 127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1608 errors:0 dropped:0 overruns:0 frame:0
TX packets:1608 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:80400 (78.5 KiB) TX bytes:80400 (78.5 KiB)
--Change new HWaddr at new server
#vim /mnt/sda2/etc/iftab
--Change new ip address at new server
#vi /mnt/sda2/etc/network/interfaces
--check mount point at new server
# vi /mnt/sda2/etc/fstabreboot.
Whould work now
Wednesday, April 25, 2007
Clone server with rsync
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment