LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-03-2007, 01:37 PM   #1
hurt138
LQ Newbie
 
Registered: Jan 2007
Distribution: Debian GNU/Linux
Posts: 9

Rep: Reputation: Disabled
Question Best Way To Clone A Running Server?


This is the situation,

I have two systems that have the same RedHat install on them. One of the boxes has had several applications (custom apps) installed and configured. Now I need to play catch up for the other system, and bring it to the same point in time.

The catch to this is that the system I need to get the info from can't be taken down for any reason.

My plan right now is to tar all the files from the root that have changed since date X. Then extract this on the 2nd system from the root it should bring it up to the same point. I am not worried about logs etc, and just want the two boxes to have the same application and configs.

Does this sound like it will work to everyone, or does anyone have a better method of cloning this running server?
 
Old 01-03-2007, 02:08 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 255Reputation: 255Reputation: 255
If you're just worried about applications and configs, first just install the new machine and install the same applications the running server has. Since it's Redhat, simply seeing the RPM packages installed by viewing the RPM database with rpm -qa will give you insight of what needs to be installed that isn't.

If you have custom applications compiled from source, etc, do those seperate or next after the RPM installs.

Then to copy configs from /etc and so on, use rsync instead of tarballs and it should sync everything up nicely.
 
Old 01-03-2007, 05:43 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 60
I just did it from one FC6 box to another FC6 box using rsync, should be pretty much the same for your Rehat boxes.

On the target machine, you may want to get into runlevel 3
Also, the target machine will likely have a different nic and hostname so I excluded the /etc/sysconfig folder.

For example:
Code:
# without excluding /etc/sysconfig
rsync -xav --delete-after / root@mudd:/

# this one shows use of exclude
rsync -xav --exclude='/etc/sysconfig' --delete-after / root@mudd:/
 
Old 01-04-2007, 02:31 AM   #4
hurt138
LQ Newbie
 
Registered: Jan 2007
Distribution: Debian GNU/Linux
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks for the reply's,

And actually it wont have a different hostname or any other settings, it is to be a cold spare server in case the orig one dies for any reason. I have used rsync for archiving backups a fair bit, but in this case because of who this is for they are a little sticky about installing anything extra (even if it is in the package list). I am guessing they will not have rsync installed but because I have used it and the community has suggested it I will lean on them some perhaps.

I really wish they had just use RAID for the drives so I could swap one out and just use it to rebuild to boxes..
 
Old 01-04-2007, 07:11 AM   #5
shawnbishop
Member
 
Registered: Dec 2005
Location: South Africa
Distribution: CentOS,Ubuntu,Fedora
Posts: 249

Rep: Reputation: 30
Hi

Use rsync like above to "mirror" the server, I use to keep mirror backups of my SAMBA servers, should the one fail (as has happened) it just change the IP address of the "mirror" server ...and off you go
 
Old 01-04-2007, 07:22 AM   #6
BittaBrotha
Member
 
Registered: Jan 2002
Location: Third Stone from the Sun
Distribution: Debian Sid, SourceMage 0.9.5, & To be Continued on a TP
Posts: 800

Rep: Reputation: 31
Take a look at SystemRescue and Partimage, is a Ghost/Drive-image clone for Linux.

http://www.sysresccd.org
 
Old 01-04-2007, 07:29 AM   #7
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 60
Quote:
Take a look at SystemRescue and Partimage, is a Ghost/Drive-image clone for Linux.
While I am a fan of SystemRescue and Partimage, the OP stated that
Quote:
The catch to this is that the system I need to get the info from can't be taken down for any reason
That rules out both livecd and partimage in this case.
 
Old 01-05-2007, 01:10 AM   #8
hurt138
LQ Newbie
 
Registered: Jan 2007
Distribution: Debian GNU/Linux
Posts: 9

Original Poster
Rep: Reputation: Disabled
Anyone had any luck with mondorescue? http://www.mondorescue.org

From the looks of things it is a installed app and does not need to shutdown any services to complete the task.

Last edited by hurt138; 01-05-2007 at 01:23 AM.
 
Old 01-05-2007, 03:41 AM   #9
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,191

Rep: Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039
Hurt,

I did this once on a running server. I started up the new one with Knoppix, tarred the original disks, ftp-ed them over, created an mbr, and the new one was running.

(Except for some NIC issues, but that is another story and not related to the cloning)

Oh, and I did that when the machines were both located 5000 miles away from where I was I just had someone down at the machines to lay in and remove the Knoppix CD and to start sshd.

jlinkels
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help running a gmod server on a linux server. Yoyo12344 Linux - Games 0 11-23-2006 06:27 PM
change from Clone to LeftOf mode without restarting X server malo_umoran Slackware 1 11-24-2005 07:34 PM
Problem running up2date on clone channel after sync to rhn. dmorgan Red Hat 0 03-15-2004 06:15 PM
so is a web server running Linux without X 4x faster than win2k server? Mr. Mojo Risin General 3 09-02-2003 08:41 PM
Best Practices in Remote administration in Redhat 8, Terminal Server clone? sboscarine Linux - General 3 02-09-2003 04:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration