Hello,
I'd like to clone existing CentOS server. Can anybody recommend any working solution to achieve that ?
Regards Przemyslaw Bak (przemol) -- http://przemol.blogspot.com/
---------------------------------------------------------------------- Wygraj nawigacje GPS! 14 sztuk czeka. Sprawdz >> http://link.interia.pl/f22f3
Hello,
I'd like to clone existing CentOS server. Can anybody recommend any working solution to achieve that ?
Regards Przemyslaw Bak (przemol)
Alexander
It will not work if the drives are in raid
On Wed, Aug 26, 2009 at 2:05 PM, Alexander Dalloz <ad+lists@uni-x.orgad%2Blists@uni-x.org
wrote:
Hello,
I'd like to clone existing CentOS server. Can anybody recommend any working solution to achieve that ?
Regards Przemyslaw Bak (przemol)
Alexander
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Ivan Varbanov wrote on Wed, 26 Aug 2009 14:10:27 +0300:
It will not work if the drives are in raid
Don't know if that is really true ... Anyway: Install a minimal system and then rsync everything over.
Kai
Hi
Kai Schaetzl maillists@conactive.com schrieb am 26.08.2009 13:31:22:
Ivan Varbanov wrote on Wed, 26 Aug 2009 14:10:27 +0300:
It will not work if the drives are in raid
Don't know if that is really true ... Anyway: Install a minimal system and then rsync everything over.
I always prefer dump(8) and restore(8) via nc(1). All those programs are available from a CentOS boot cd. But be aware that this makes a full clone with all the possible crap and leftovers which might be hanging around on your system.
So I tend to do an appropriate install of the new machine, and selectively copy configuration files and the data I know I want and install the packages I need. Yes, it's a bit more work than just cloning, but also a good opportunity to get rid of old ballast.
Frank.
On Wed, Aug 26, 2009 at 01:46:26PM +0200, Frank.Brodbeck@klingel.de wrote:
Hi
Kai Schaetzl maillists@conactive.com schrieb am 26.08.2009 13:31:22:
Ivan Varbanov wrote on Wed, 26 Aug 2009 14:10:27 +0300:
It will not work if the drives are in raid
Don't know if that is really true ... Anyway: Install a minimal system and then rsync everything over.
I always prefer dump(8) and restore(8) via nc(1). All those programs are available from a CentOS boot cd. But be aware that this makes a full clone with all the possible crap and leftovers which might be hanging around on your system.
So I tend to do an appropriate install of the new machine, and selectively copy configuration files and the data I know I want and install the packages I need. Yes, it's a bit more work than just cloning, but also a good opportunity to get rid of old ballast.
Frank,
I would prefer installing new server but sometimes (i.e. when you take over some servers) you don't have enough time to carefully select what should and what shouldn't be copied.
Regards Przemyslaw Bak (przemol) -- http://przemol.blogspot.com/
---------------------------------------------------------------------- Szukasz pracy? Sprawdź nasze oferty! http://link.interia.pl/f22b8
R-Elists wrote:
Don't know if that is really true ... Anyway: Install a minimal system and then rsync everything over.
Kai
-- Kai Schätzl, Berlin, Germany
Kai
for list purposes, would you consider sharing a script that shows what to sync and what *not* to sync
:-)
I usually sync everything except /dev, /sys, /proc
However, you will also need to edit /etc/fstab and /boot/grub/grub.conf if the disk configurations are different.
You also might need to edit /etc/hosts and /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth* to change IP addresses.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
thus Johnny Hughes spake: | R-Elists wrote: |>> Don't know if that is really true ... Anyway: |>> Install a minimal system and then rsync everything over. |>> |>> Kai |>> |>> -- |>> Kai Schätzl, Berlin, Germany |> Kai |> |> for list purposes, would you consider sharing a script that shows what to |> sync and what *not* to sync |> |> :-) | | I usually sync everything except /dev, /sys, /proc | | However, you will also need to edit /etc/fstab and /boot/grub/grub.conf | if the disk configurations are different. | | You also might need to edit /etc/hosts and /etc/sysconfig/network and | /etc/sysconfig/network-scripts/ifcfg-eth* to change IP addresses.
Don't forget /etc/ssh/...
Timo
Johnny Hughes wrote on Wed, 26 Aug 2009 09:42:58 -0500:
However, you will also need to edit /etc/fstab and /boot/grub/grub.conf if the disk configurations are different.
or update before the sync and then leave out /boot as well.
Kai
Johnny Hughes wrote on Wed, 26 Aug 2009 09:42:58 -0500:
However, you will also need to edit /etc/fstab and /boot/grub/grub.conf if the disk configurations are different.
or update before the sync and then leave out /boot as well.
Kai
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
Behalf
Of Kai Schaetzl Sent: Wednesday, August 26, 2009 1:31 PM To: centos@centos.org Subject: Re: [CentOS] How to clone CentOS server ?
Ivan Varbanov wrote on Wed, 26 Aug 2009 14:10:27 +0300:
It will not work if the drives are in raid
Don't know if that is really true ... Anyway: Install a minimal system and then rsync everything over.
I've tried g4u as well, same thing there. It doesn't see raid arrays as well.
I had reason to try this out the other day when one of our windows servers died because of a power out and a faulty UPS.
Ivan Varbanov wrote:
> > Hello, > > I'd like to clone existing CentOS server. Can anybody > recommend any working solution to achieve that ? > http://clonezilla.org/
It will not work if the drives are in raid
If you have RAID1, you can just pull one of the mirror drives, move it to a new box, and let both systems rebuild to new partners.
Clonezilla is probably the fastest way to copy non-raid disks (lvm works if it is on a single drive) because it knows enough about most filesystems to only copy the used blocks. It also lets you use a network share (nfs/smb/sshfs) for intermediate storage of compressed images so you don't have to connect the source and target drives to the same system or access them at the same time. The target disk has to be the same size or larger and you will have some extra work to do if the target hardware needs different disk drivers.
anyone used this one and can say experience:
--- 09/8/26 (三),Alexander Dalloz ad+lists@uni-x.org 寫道:
寄件者: Alexander Dalloz ad+lists@uni-x.org 主旨: Re: [CentOS] How to clone CentOS server ? 收件者: "CentOS mailing list" centos@centos.org 日期: 2009年8月26日,三,上午7:05
Hello,
I'd like to clone existing CentOS server. Can anybody recommend any working solution to achieve that ?
Regards Przemyslaw Bak (przemol)
Alexander
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
___________________________________________________ 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! http://messenger.yahoo.com.tw/
Am Donnerstag, den 27.08.2009, 14:59 +0200 schrieb mcclnx mcc:
anyone used this one and can say experience:
I tried it 4 or 5 times. Always failed...
financial.com AG
Munich head office/Hauptsitz München: Maria-Probst-Str. 19 | 80939 München | Germany Frankfurt branch office/Niederlassung Frankfurt: Messeturm | Friedrich-Ebert-Anlage 49 | 60327 Frankfurt | Germany Management board/Vorstand: Dr. Steffen Boehnert (CEO/Vorsitzender) | Dr. Alexis Eisenhofer | Dr. Yann Samson | Matthias Wiederwach Supervisory board/Aufsichtsrat: Dr. Dr. Ernst zur Linden (chairman/Vorsitzender) Register court/Handelsregister: Munich – HRB 128 972 | Sales tax ID number/St.Nr.: DE205 370 553
mcclnx mcc wrote:
anyone used this one and can say experience:
It works great under the following conditions:
The target hardware is identical - or at least the same type disk controller.
The target drive is at least as large as the source.
You don't have software raid or LVM spanning drives.
At 12:43 +0200 26/8/09, przemolicc@poczta.fm wrote:
Hello,
I'd like to clone existing CentOS server. Can anybody recommend any working solution to achieve that ?
I've used the dd + netcat + live CD technique with success in the past eg:
http://alma.ch/blogs/bahut/2005/02/wonders-of-dd-and-netcat-cloning-os.html
Cheers Simon
2009/8/26 przemolicc@poczta.fm:
Hello,
I'd like to clone existing CentOS server. Can anybody recommend any working solution to achieve that ?
I have had success with Mondo. There are some issues with OCFS2 and some Dell storage, otherwise it worked with quite complicated hardware RAID schemes.
przemolicc@poczta.fm wrote:
I'd like to clone existing CentOS server. Can anybody recommend any working solution to achieve that ?
1) virsh shutdown vmxx 2) cp /etc/libvirt/qemu/vmxx /etc/libvirt/qemu/vmyy 3) cp <old image file> <new image file> 4) perl -pi -w -e 's/old image file/new image file/g;' /etc/libvirt/qemu/vmyy 5) adjust new name in /etc/libvirt/qemu/vmyy 6) reload libvirtd 7) virsh start vmxx virsh start vmyy
HTH Regards Michael
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
thus Michael Kress spake: | przemolicc@poczta.fm wrote: |> I'd like to clone existing CentOS server. Can anybody |> recommend any working solution to achieve that ? | | 1) virsh shutdown vmxx | 2) cp /etc/libvirt/qemu/vmxx /etc/libvirt/qemu/vmyy | 3) cp <old image file> <new image file> | 4) perl -pi -w -e 's/old image file/new image file/g;' /etc/libvirt/qemu/vmyy | 5) adjust new name in /etc/libvirt/qemu/vmyy | 6) reload libvirtd | 7) virsh start vmxx | virsh start vmyy | | HTH | Regards | Michael
Hm... Using Xen or OpenVZ it is similarly easy to clone a maschine, even without having to shut down things. However, I have the feeling that the thread starter has a physical machine to clone? ;)
Timo